refactor(cloud-provider): Use WaitForNamedCacheSyncWithContext

Signed-off-by: Aditi Gupta <aditigpta@google.com>
This commit is contained in:
Aditi Gupta
2025-09-18 11:43:43 -07:00
parent 203793fe65
commit 19356ad118
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
}