From c6d65162000db72d1049c3837d778715a1462294 Mon Sep 17 00:00:00 2001 From: Kostiantyn Kalynovskyi Date: Tue, 26 Jan 2021 20:25:52 +0000 Subject: [PATCH] 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 --- pkg/cluster/clustermap/map.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkg/cluster/clustermap/map.go b/pkg/cluster/clustermap/map.go index 6f6bf560a..989b51a2c 100644 --- a/pkg/cluster/clustermap/map.go +++ b/pkg/cluster/clustermap/map.go @@ -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]