Merge "Fix config clusters index in CurrentContextCluster()"

This commit is contained in:
Zuul 2020-01-23 19:45:01 +00:00 committed by Gerrit Code Review
commit 3a3d0ae90c

View File

@ -596,8 +596,10 @@ func (c *Config) CurrentContextCluster() (*Cluster, error) {
if err != nil {
return nil, err
}
clusterName := NewClusterComplexName()
clusterName.FromName(currentContext.KubeContext().Cluster)
return c.Clusters[currentContext.KubeContext().Cluster].ClusterTypes[currentContext.ClusterType()], nil
return c.Clusters[clusterName.ClusterName()].ClusterTypes[currentContext.ClusterType()], nil
}
func (c *Config) CurrentContextAuthInfo() (*AuthInfo, error) {