mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-18 04:54:54 +00:00
refactor(cloud-provider): Use WaitForNamedCacheSyncWithContext
Signed-off-by: Aditi Gupta <aditigpta@google.com>
This commit is contained in:
@@ -104,7 +104,7 @@ func (rc *RouteController) Run(ctx context.Context, syncPeriod time.Duration, co
|
||||
controllerManagerMetrics.ControllerStarted("route")
|
||||
defer controllerManagerMetrics.ControllerStopped("route")
|
||||
|
||||
if !cache.WaitForNamedCacheSync("route", ctx.Done(), rc.nodeListerSynced) {
|
||||
if !cache.WaitForNamedCacheSyncWithContext(ctx, rc.nodeListerSynced) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -237,7 +237,7 @@ func (c *Controller) Run(ctx context.Context, workers int, controllerManagerMetr
|
||||
controllerManagerMetrics.ControllerStarted("service")
|
||||
defer controllerManagerMetrics.ControllerStopped("service")
|
||||
|
||||
if !cache.WaitForNamedCacheSync("service", ctx.Done(), c.serviceListerSynced, c.nodeListerSynced) {
|
||||
if !cache.WaitForNamedCacheSyncWithContext(ctx, c.serviceListerSynced, c.nodeListerSynced) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user