implement AddIndexers for SharedIndexInformer

This commit is contained in:
mqliang
2016-05-02 12:35:18 +08:00
parent 9011207f18
commit c10f43a2e5
17 changed files with 107 additions and 61 deletions

View File

@@ -104,7 +104,7 @@ func NewEndpointController(podInformer framework.SharedIndexInformer, client *cl
// NewEndpointControllerFromClient returns a new *EndpointController that runs its own informer.
func NewEndpointControllerFromClient(client *clientset.Clientset, resyncPeriod controller.ResyncPeriodFunc) *EndpointController {
podInformer := informers.CreateSharedIndexPodInformer(client, resyncPeriod(), cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
podInformer := informers.CreateSharedPodIndexInformer(client, resyncPeriod())
e := NewEndpointController(podInformer, client)
e.internalPodInformer = podInformer