mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-21 01:50:55 +00:00
move WaitForCacheSync to the sharedInformer package
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
This commit is contained in:
@@ -37,7 +37,6 @@ import (
|
||||
bootstrapapi "k8s.io/cluster-bootstrap/token/api"
|
||||
jws "k8s.io/cluster-bootstrap/token/jws"
|
||||
api "k8s.io/kubernetes/pkg/apis/core"
|
||||
"k8s.io/kubernetes/pkg/controller"
|
||||
"k8s.io/kubernetes/pkg/util/metrics"
|
||||
)
|
||||
|
||||
@@ -159,7 +158,7 @@ func (e *Signer) Run(stopCh <-chan struct{}) {
|
||||
defer utilruntime.HandleCrash()
|
||||
defer e.syncQueue.ShutDown()
|
||||
|
||||
if !controller.WaitForCacheSync("bootstrap_signer", stopCh, e.configMapSynced, e.secretSynced) {
|
||||
if !cache.WaitForNamedCacheSync("bootstrap_signer", stopCh, e.configMapSynced, e.secretSynced) {
|
||||
return
|
||||
}
|
||||
|
||||
|
@@ -117,7 +117,7 @@ func (tc *TokenCleaner) Run(stopCh <-chan struct{}) {
|
||||
klog.Infof("Starting token cleaner controller")
|
||||
defer klog.Infof("Shutting down token cleaner controller")
|
||||
|
||||
if !controller.WaitForCacheSync("token_cleaner", stopCh, tc.secretSynced) {
|
||||
if !cache.WaitForNamedCacheSync("token_cleaner", stopCh, tc.secretSynced) {
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user