mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
move WaitForCacheSync to the sharedInformer package
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
This commit is contained in:
@@ -14,7 +14,6 @@ go_library(
|
||||
],
|
||||
importpath = "k8s.io/kubernetes/pkg/proxy/config",
|
||||
deps = [
|
||||
"//pkg/controller:go_default_library",
|
||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||
"//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
||||
"//staging/src/k8s.io/client-go/informers/core/v1:go_default_library",
|
||||
|
||||
@@ -25,7 +25,6 @@ import (
|
||||
coreinformers "k8s.io/client-go/informers/core/v1"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
"k8s.io/klog"
|
||||
"k8s.io/kubernetes/pkg/controller"
|
||||
)
|
||||
|
||||
// ServiceHandler is an abstract interface of objects which receive
|
||||
@@ -95,7 +94,7 @@ func (c *EndpointsConfig) RegisterEventHandler(handler EndpointsHandler) {
|
||||
func (c *EndpointsConfig) Run(stopCh <-chan struct{}) {
|
||||
klog.Info("Starting endpoints config controller")
|
||||
|
||||
if !controller.WaitForCacheSync("endpoints config", stopCh, c.listerSynced) {
|
||||
if !cache.WaitForNamedCacheSync("endpoints config", stopCh, c.listerSynced) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -186,7 +185,7 @@ func (c *ServiceConfig) RegisterEventHandler(handler ServiceHandler) {
|
||||
func (c *ServiceConfig) Run(stopCh <-chan struct{}) {
|
||||
klog.Info("Starting service config controller")
|
||||
|
||||
if !controller.WaitForCacheSync("service config", stopCh, c.listerSynced) {
|
||||
if !cache.WaitForNamedCacheSync("service config", stopCh, c.listerSynced) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user