Skip to content

Commit 80c52b8

Browse files
stttsk8s-publishing-bot
authored andcommitted
Call non-blocking informerFactory.Start synchronously to avoid races
Signed-off-by: Dr. Stefan Schimanski <[email protected]> Kubernetes-commit: c7a1fa432a87579895eac4b3873162d5f1dba7f5
1 parent e64302e commit 80c52b8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: cmd/informer-gen/generators/factory.go

+1
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ type SharedInformerFactory interface {
299299
300300
// Start initializes all requested informers. They are handled in goroutines
301301
// which run until the stop channel gets closed.
302+
// Warning: Start does not block. When run in a go-routine, it will race with a later WaitForCacheSync.
302303
Start(stopCh <-chan struct{})
303304
304305
// Shutdown marks a factory as shutting down. At that point no new

0 commit comments

Comments
 (0)