Skip to content

Commit

Permalink
Call non-blocking informerFactory.Start synchronously to avoid races
Browse files Browse the repository at this point in the history
Signed-off-by: Dr. Stefan Schimanski <[email protected]>

Kubernetes-commit: c7a1fa432a87579895eac4b3873162d5f1dba7f5
  • Loading branch information
sttts authored and k8s-publishing-bot committed Jul 27, 2024
1 parent e64302e commit 80c52b8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/informer-gen/generators/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ type SharedInformerFactory interface {
// Start initializes all requested informers. They are handled in goroutines
// which run until the stop channel gets closed.
// Warning: Start does not block. When run in a go-routine, it will race with a later WaitForCacheSync.
Start(stopCh <-chan struct{})
// Shutdown marks a factory as shutting down. At that point no new
Expand Down

0 comments on commit 80c52b8

Please sign in to comment.