move WaitForCacheSync to the sharedInformer package
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
This commit is contained in:
@@ -32,7 +32,6 @@ import (
|
||||
"k8s.io/client-go/tools/cache"
|
||||
"k8s.io/client-go/util/workqueue"
|
||||
"k8s.io/klog"
|
||||
"k8s.io/kubernetes/pkg/controller"
|
||||
"k8s.io/kubernetes/pkg/util/metrics"
|
||||
)
|
||||
|
||||
@@ -117,7 +116,7 @@ func (c *ServiceAccountsController) Run(workers int, stopCh <-chan struct{}) {
|
||||
klog.Infof("Starting service account controller")
|
||||
defer klog.Infof("Shutting down service account controller")
|
||||
|
||||
if !controller.WaitForCacheSync("service account", stopCh, c.saListerSynced, c.nsListerSynced) {
|
||||
if !cache.WaitForNamedCacheSync("service account", stopCh, c.saListerSynced, c.nsListerSynced) {
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user