Files
kubernetes/pkg/util
Jefftree fc53227b90 Fix FSWatcher goroutine leak by adding ctx to Run()
FSWatcher.Run() spawned a goroutine with no exit mechanism, causing a
goroutine leak. Add a ctx context.Context parameter to Run() so the
goroutine can exit cleanly when the context is canceled, and
defer-close the underlying fsnotify watcher on exit.

For kube-proxy, the existing ctx from runLoop() is passed directly.
For the flexvolume prober, ctx is stored in flexVolumeProber at
construction time via GetDynamicPluginProber(), representing the
component lifetime (kubelet/controller-manager), which is the
appropriate scope for this long-running watcher.
2026-02-23 21:30:34 -05:00
..
2024-12-02 16:59:34 +01:00
2024-08-10 23:32:23 +08:00
2025-10-10 23:51:05 +08:00