aboutsummaryrefslogtreecommitdiffstats
path: root/src/k8splugin/internal/app/instance.go
diff options
context:
space:
mode:
authorBin Yang <bin.yang@windriver.com>2019-04-23 02:02:41 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-23 02:02:42 +0000
commita767721c447a624cebdec811795475fd5345b9ff (patch)
tree6ef6f81aba957dc4aba1f7311fb1a18cd07c08f0 /src/k8splugin/internal/app/instance.go
parentce36e99a466993bdbbfba8a235db52e565da3340 (diff)
parent42f8f006ab01692d7de9cecc06521eaf58743c0d (diff)
Merge "Move configuration into config files"
Diffstat (limited to 'src/k8splugin/internal/app/instance.go')
-rw-r--r--src/k8splugin/internal/app/instance.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/k8splugin/internal/app/instance.go b/src/k8splugin/internal/app/instance.go
index 8e9a2b7a..8d289d85 100644
--- a/src/k8splugin/internal/app/instance.go
+++ b/src/k8splugin/internal/app/instance.go
@@ -20,8 +20,8 @@ import (
"encoding/base64"
"encoding/json"
"math/rand"
- "os"
+ "k8splugin/internal/config"
"k8splugin/internal/db"
"k8splugin/internal/helm"
"k8splugin/internal/rb"
@@ -120,7 +120,7 @@ func (v *InstanceClient) Create(i InstanceRequest) (InstanceResponse, error) {
}
k8sClient := KubernetesClient{}
- err = k8sClient.init(os.Getenv("KUBE_CONFIG_DIR") + "/" + i.CloudRegion)
+ err = k8sClient.init(config.GetConfiguration().KubeConfigDir + "/" + i.CloudRegion)
if err != nil {
return InstanceResponse{}, pkgerrors.Wrap(err, "Getting CloudRegion Information")
}
@@ -185,7 +185,7 @@ func (v *InstanceClient) Delete(id string) error {
}
k8sClient := KubernetesClient{}
- err = k8sClient.init(os.Getenv("KUBE_CONFIG_DIR") + "/" + inst.CloudRegion)
+ err = k8sClient.init(config.GetConfiguration().KubeConfigDir + "/" + inst.CloudRegion)
if err != nil {
return pkgerrors.Wrap(err, "Getting CloudRegion Information")
}