diff --git a/federation/client/cache/BUILD b/federation/client/cache/BUILD index 781d2a7ffed..d35f6605d59 100644 --- a/federation/client/cache/BUILD +++ b/federation/client/cache/BUILD @@ -13,7 +13,6 @@ go_library( tags = ["automanaged"], deps = [ "//federation/apis/federation/v1beta1:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", "//vendor/k8s.io/client-go/tools/cache:go_default_library", ], ) diff --git a/federation/client/cache/cluster_cache.go b/federation/client/cache/cluster_cache.go index 796959d3548..82c30de3e7b 100644 --- a/federation/client/cache/cluster_cache.go +++ b/federation/client/cache/cluster_cache.go @@ -17,7 +17,6 @@ limitations under the License. package cache import ( - "github.com/golang/glog" kubecache "k8s.io/client-go/tools/cache" "k8s.io/kubernetes/federation/apis/federation/v1beta1" ) @@ -34,31 +33,3 @@ func (s *StoreToClusterLister) List() (clusters v1beta1.ClusterList, err error) } return clusters, nil } - -// ClusterConditionPredicate is a function that indicates whether the given cluster's conditions meet -// some set of criteria defined by the function. -type ClusterConditionPredicate func(cluster v1beta1.Cluster) bool - -// storeToClusterConditionLister filters and returns nodes matching the given type and status from the store. -type storeToClusterConditionLister struct { - store kubecache.Store - predicate ClusterConditionPredicate -} - -// ClusterCondition returns a storeToClusterConditionLister -func (s *StoreToClusterLister) ClusterCondition(predicate ClusterConditionPredicate) storeToClusterConditionLister { - return storeToClusterConditionLister{s.Store, predicate} -} - -// List returns a list of clusters that match the conditions defined by the predicate functions in the storeToClusterConditionLister. -func (s storeToClusterConditionLister) List() (clusters v1beta1.ClusterList, err error) { - for _, m := range s.store.List() { - cluster := *m.(*v1beta1.Cluster) - if s.predicate(cluster) { - clusters.Items = append(clusters.Items, cluster) - } else { - glog.V(5).Infof("Cluster %s matches none of the conditions", cluster.Name) - } - } - return -} diff --git a/federation/pkg/federation-controller/cluster/cluster_client.go b/federation/pkg/federation-controller/cluster/cluster_client.go index e3104c85781..313975338aa 100644 --- a/federation/pkg/federation-controller/cluster/cluster_client.go +++ b/federation/pkg/federation-controller/cluster/cluster_client.go @@ -33,10 +33,7 @@ import ( ) const ( - UserAgentName = "Cluster-Controller" - KubeAPIQPS = 20.0 - KubeAPIBurst = 30 - KubeconfigSecretDataKey = "kubeconfig" + UserAgentName = "Cluster-Controller" ) type ClusterClient struct {