summaryrefslogtreecommitdiffstats
path: root/src/k8splugin/internal/app/instance.go
diff options
context:
space:
mode:
authorKiran Kamineni <kiran.k.kamineni@intel.com>2019-04-18 16:38:20 -0700
committerKiran Kamineni <kiran.k.kamineni@intel.com>2019-04-19 15:48:48 -0700
commit42f8f006ab01692d7de9cecc06521eaf58743c0d (patch)
tree03bc5fe0dd662cec4c36e2b67da84cfd30602950 /src/k8splugin/internal/app/instance.go
parent5414c23063815207c68bfc7398561cec7409c963 (diff)
Move configuration into config files
Move k8splugin configuration into config files instead of using environment variables. Issue-ID: MULTICLOUD-579 Change-Id: I7b76d5a14d24f002a8db484097a31fb5e908b6f8 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
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")
}