Merge pull request #43939 from FengyunPan/remove-nameIndexFunc

Automatic merge from submit-queue (batch tested with PRs 44424, 44026, 43939, 44386, 42914)

ServiceAccountsController does not need nameIndexFunc to index ST

The ServiceAccountsController's Informer does not need nameIndexFunc.
This commit is contained in:
Kubernetes Submit Queue 2017-04-13 22:07:07 -07:00 committed by GitHub
commit 113606cbaa
2 changed files with 0 additions and 11 deletions

View File

@ -32,7 +32,6 @@ go_library(
"//pkg/util/metrics:go_default_library",
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/apimachinery/pkg/api/errors",
"//vendor:k8s.io/apimachinery/pkg/api/meta",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/fields",
"//vendor:k8s.io/apimachinery/pkg/runtime",

View File

@ -22,7 +22,6 @@ import (
"github.com/golang/glog"
apierrs "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
@ -36,15 +35,6 @@ import (
"k8s.io/kubernetes/pkg/util/metrics"
)
// nameIndexFunc is an index function that indexes based on an object's name
func nameIndexFunc(obj interface{}) ([]string, error) {
meta, err := meta.Accessor(obj)
if err != nil {
return []string{""}, fmt.Errorf("object has no meta: %v", err)
}
return []string{meta.GetName()}, nil
}
// ServiceAccountsControllerOptions contains options for running a ServiceAccountsController
type ServiceAccountsControllerOptions struct {
// ServiceAccounts is the list of service accounts to ensure exist in every namespace