Merge pull request #70072 from yue9944882/chore/cleanup-serviceaccount-controller-options

Fixes wild serviceaccount controller resync options
This commit is contained in:
k8s-ci-robot 2018-10-22 21:18:48 -07:00 committed by GitHub
commit dbdcb7e053
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,16 +73,16 @@ func NewServiceAccountsController(saInformer coreinformers.ServiceAccountInforme
}
}
saInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
saInformer.Informer().AddEventHandlerWithResyncPeriod(cache.ResourceEventHandlerFuncs{
DeleteFunc: e.serviceAccountDeleted,
})
}, options.ServiceAccountResync)
e.saLister = saInformer.Lister()
e.saListerSynced = saInformer.Informer().HasSynced
nsInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
nsInformer.Informer().AddEventHandlerWithResyncPeriod(cache.ResourceEventHandlerFuncs{
AddFunc: e.namespaceAdded,
UpdateFunc: e.namespaceUpdated,
})
}, options.NamespaceResync)
e.nsLister = nsInformer.Lister()
e.nsListerSynced = nsInformer.Informer().HasSynced