Skip to content

Commit 3cecee0

Browse files
committed
Use ClusterWithContext in cached resources replication
Signed-off-by: Nelo-T. Wallus <n.wallus@sap.com>
1 parent 0da72ec commit 3cecee0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/reconciler/cache/cachedresources/cachedresources_reconcile_replication.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ func (r *replication) reconcile(ctx context.Context, cachedResource *cachev1alph
7979
global := r.cacheKcpInformers.Cache().V1alpha1().CachedObjects()
8080

8181
// Local informer is based on the specific types we want to replicate.
82-
// TODO: use ClusterWithContext
83-
local, err := r.discoveringDynamicKcpInformers.Cluster(cluster).ForResource(gvr)
82+
local, err := r.discoveringDynamicKcpInformers.ClusterWithContext(ctx, cluster).ForResource(gvr)
8483
if err != nil {
8584
logger.Error(err, "Failed to get local informer for resource", "resource", gvr)
8685
cancel()

0 commit comments

Comments
 (0)