Add MemoryReservationPolicy (None/HardReservation) controls memory.min. This allows
independently of memory.min protection, providing operators more
granular control over memoryQoS behavior.
Signed-off-by: Qi Wang <qiwan@redhat.com>
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.
- bump init backoff to Duration=30ms, Factor=8 (Steps=6) to yield ~140s total
- prevent kubelet restarts when DNS is blackholed and NSS must fall back to myhostname
- keep CSI/CSINode initialization alive long enough to complete in ARO DNS-failure scenarios
When CSI's AttachRequired changes from true to false after a successful
volume attach, MarkVolumeAsAttached fails because it attempts to look up
the plugin by spec, which fails verification.
This patch passes the VolumeName directly to MarkVolumeAsAttached.
This allows the function to skip the plugin lookup and correctly mark
the volume as attached in the Actual State of World, ensuring
VolumeAttachment cleanup can proceed.
Signed-off-by: hongkang <mzhkcj50@gmail.com>
This has been replaced by `//build:...` for a long time now.
Removal of the old build tag was automated with:
for i in $(git grep -l '^// +build' | grep -v -e '^vendor/'); do if ! grep -q '^// Code generated' "$i"; then sed -i -e '/^\/\/ +build/d' "$i"; fi; done
The code actually calls os.Remove(), not rmdir(). The error message
should accurately reflect the operation being performed.
os.Remove() can remove both files and directories, while rmdir()
only removes directories
Signed-off-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Certain failures during SetupDevice and MapPodDevice are not treated as
transient in the csi raw block plugin implementation, while they are in
the file mode plugin. This can lead to certain failures causing volumes
to be marked as unmounted incorrectly.
This patch brings the block plugin up to parity with the fs one by
marking the equivalent calls as transient. This mostly covers API server
and some csi driver calls.
CSI drivers can be installed while the node is still initializing since the daemonsets usually tolerate all taints. As a result, we also need to make sure the outdated CSINode object has been removed before installing a new CSI driver.
- Improve slice declaration formatting in quota_common_linux_impl.go
- Enhance variable naming clarity (myMPSlash -> myMountPointWithSlash)
- Standardize function comment format for consistency
- Add trailing comma to slice declarations following Go conventions
These are non-breaking improvements that enhance code
readability and maintain consistency with Go best practices.
Signed-off-by: Humble Devassy Chirammal <humble.devassy@gmail.com>