kubernetes/pkg/volume/flexvolume
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
..
attacher-defaults.go Remove GetExec method from VolumeHost 2025-06-13 10:58:37 +08:00
attacher.go Remove pluginName param from GetMounter and GetExec 2025-06-12 17:29:17 +08:00
attacher_test.go Pass FsGroup to MountDevice 2021-07-03 16:29:42 -07:00
common_test.go unittests: Fixes unit tests for Windows (part 2) 2022-08-01 18:56:32 +03:00
detacher-defaults.go Remove pluginName param from GetMounter and GetExec 2025-06-12 17:29:17 +08:00
detacher.go Remove pluginName param from GetMounter and GetExec 2025-06-12 17:29:17 +08:00
detacher_test.go Introduce test harness into unit tests 2018-10-08 18:44:05 -04:00
driver-call.go Fix Go vet errors for master golang 2024-09-20 12:36:38 +05:30
driver-call_test.go refactor(flexvolume): simplify capabilities handling 2017-08-24 22:18:58 +11:00
expander-defaults.go Remove pluginName param from GetMounter and GetExec 2025-06-12 17:29:17 +08:00
expander.go Move resize function parameters to a new ResizeOptions type 2019-03-08 09:21:44 -05:00
fake_watcher.go Fix FSWatcher goroutine leak by adding ctx to Run() 2026-02-23 21:30:34 -05:00
flexvolume_test.go unittests: Fixes unit tests for Windows (part 2) 2022-08-01 18:56:32 +03:00
mounter-defaults.go Merge pull request #104732 from mengjiao-liu/remove-flag-experimental-check-node-capabilities-before-mount 2022-02-24 07:56:30 -08:00
mounter.go Handle returned error as placeholder variables for now 2025-02-24 16:26:48 -05:00
mounter_test.go Change code to use staging/k8s.io/mount-utils 2020-09-16 21:51:24 -07:00
OWNERS Cleanup OWNERS files (No Activity in the last year) 2021-12-15 10:34:02 -05:00
plugin-defaults.go Fix log format in flexvolume 2021-04-13 21:42:07 +08:00
plugin.go volume: simplify elem check with slices.Contains. 2026-02-05 14:47:40 +01:00
plugin_test.go bump k8s.io/utils version 2019-12-21 14:54:44 +08:00
probe.go Fix FSWatcher goroutine leak by adding ctx to Run() 2026-02-23 21:30:34 -05:00
probe_test.go Revert "Merge pull request #127669 from olyazavr/fix-probe-race" 2024-10-30 11:16:47 -04:00
unmounter-defaults.go Change code to use staging/k8s.io/mount-utils 2020-09-16 21:51:24 -07:00
unmounter.go cleanup: fix log capitalization in volume package 2021-04-14 21:58:56 +08:00
unmounter_test.go Change code to use staging/k8s.io/mount-utils 2020-09-16 21:51:24 -07:00
util.go cleanup: fix log capitalization in volume package 2021-04-14 21:58:56 +08:00
volume.go Change code to use staging/k8s.io/mount-utils 2020-09-16 21:51:24 -07:00