Merge pull request #134138 from aditigupta96/refactor-cloud-provider-waitfornamedcachesync

refactor(cloud-provider): Use WaitForNamedCacheSyncWithContext
This commit is contained in:
Kubernetes Prow Robot
2025-09-23 13:00:15 -07:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -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
}

View File

@@ -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
}