From 302eac91493e5729f8e9ce667766203237f73f22 Mon Sep 17 00:00:00 2001 From: Hadrien Patte Date: Fri, 15 Aug 2025 20:15:36 +0200 Subject: [PATCH] Update `sharedInformerFactoryInterface` context initialization example Signed-off-by: Hadrien Patte Kubernetes-commit: ef1878c6013f44a4b5a8800033c73551ea77c91f --- informers/factory.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/informers/factory.go b/informers/factory.go index 3b755ea6..bd3d16c0 100644 --- a/informers/factory.go +++ b/informers/factory.go @@ -224,7 +224,7 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal // // It is typically used like this: // -// ctx, cancel := context.Background() +// ctx, cancel := context.WithCancel(context.Background()) // defer cancel() // factory := NewSharedInformerFactory(client, resyncPeriod) // defer factory.WaitForStop() // Returns immediately if nothing was started.