Cleanup ClusterMap interface

This commit deletes a left over method that was used to get
namespace of the cluster. Instead ClusterAPIRef should be
used to get both name and namespace of the cluster in
terms of cluster-api.

Change-Id: I770cd11094257df29e1cac2c63ed3edecd62e54f
This commit is contained in:
Kostiantyn Kalynovskyi 2021-01-26 20:25:52 +00:00
parent 8efb786a6a
commit c6d6516200

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]