Merge "Cleanup ClusterMap interface"

This commit is contained in:
Zuul 2021-01-28 08:10:20 +00:00 committed by Gerrit Code Review
commit aacaefc820

View File

@ -29,7 +29,6 @@ type ClusterMap interface {
ParentCluster(string) (string, error)
AllClusters() []string
DynamicKubeConfig(string) bool
ClusterNamespace(string) (string, error)
ClusterKubeconfigContext(string) (string, error)
ClusterAPIRef(string) (ClusterAPIRef, error)
}
@ -107,12 +106,6 @@ func (cm clusterMap) ClusterAPIRef(clusterName string) (ClusterAPIRef, error) {
}, nil
}
// ClusterNamespace a namespace for given cluster
// TODO implement how to get namespace for cluster
func (cm clusterMap) ClusterNamespace(clusterName string) (string, error) {
return "default", nil
}
// ClusterKubeconfigContext returns name of the context in kubeconfig corresponding to a given cluster
func (cm clusterMap) ClusterKubeconfigContext(clusterName string) (string, error) {
cluster, exists := cm.apiMap.Map[clusterName]