aboutsummaryrefslogtreecommitdiffstats
path: root/src/dcm/pkg/module/cluster.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/dcm/pkg/module/cluster.go')
-rw-r--r--src/dcm/pkg/module/cluster.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/dcm/pkg/module/cluster.go b/src/dcm/pkg/module/cluster.go
index 33de7acf..6ad46404 100644
--- a/src/dcm/pkg/module/cluster.go
+++ b/src/dcm/pkg/module/cluster.go
@@ -59,7 +59,7 @@ type KubeConfig struct {
Kind string `yaml:"kind"`
Clusters []KubeCluster `yaml:"clusters"`
Contexts []KubeContext `yaml:"contexts"`
- CurrentContext string `yaml:"current-context`
+ CurrentContext string `yaml:"current-context"`
Preferences map[string]string `yaml:"preferences"`
Users []KubeUser `yaml:"users"`
}
@@ -260,7 +260,11 @@ func (v *ClusterClient) UpdateCluster(project, logicalCloud, clusterReference st
// Get returns Cluster's kubeconfig for corresponding cluster reference
func (v *ClusterClient) GetClusterConfig(project, logicalCloud, clusterReference string) (string, error) {
lcClient := NewLogicalCloudClient()
- context, ctxVal, err := lcClient.GetLogicalCloudContext(project, logicalCloud)
+ lckey := LogicalCloudKey{
+ Project: project,
+ LogicalCloudName: logicalCloud,
+ }
+ context, ctxVal, err := lcClient.util.GetLogicalCloudContext(lcClient.storeName, lckey, lcClient.tagMeta, project, logicalCloud)
if err != nil {
return "", pkgerrors.Wrap(err, "Error getting logical cloud context.")
}
@@ -268,11 +272,6 @@ func (v *ClusterClient) GetClusterConfig(project, logicalCloud, clusterReference
return "", pkgerrors.New("Logical Cloud hasn't been applied yet")
}
- // private key comes from logical cloud
- lckey := LogicalCloudKey{
- Project: project,
- LogicalCloudName: logicalCloud,
- }
// get logical cloud resource
lc, err := lcClient.Get(project, logicalCloud)
if err != nil {