Commit graph

3988 commits

Author SHA1 Message Date
Qi Wang
f1ccd2d8aa Add MemoryReservationPolicy to kubeletconfig for MemoryQoS feature
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>
2026-03-16 11:24:34 -04:00
Kubernetes Prow Robot
c232632ac5
Merge pull request #137213 from Jefftree/leak-fix
Fix FSWatcher goroutine leak by adding ctx to Run()
2026-03-12 06:09:42 +05:30
Kubernetes Prow Robot
2f9c2462f7
Merge pull request #137332 from gavinkflam/fix-projected-token-link-file-owner-uid
bug: Fix link file ownership of projected serviceAccountToken
2026-03-10 19:29:11 +05:30
Jordan Liggitt
45900a1deb
Fix vet error 2026-03-05 18:11:02 -05:00
Kubernetes Prow Robot
8275484dcf
Merge pull request #137297 from atombrella/feature/pkg_forvar_modernize
Remove redundant variable re-assignment in for-loops under pkg
2026-03-05 00:28:20 +05:30
Mads Jensen
f11bb48738 Remove redundant re-assignment in for-loops under pkg
This the forvar rule from modernize. The semantics of the for-loop
changed from Go 1.22 to make this pattern obsolete.
2026-03-02 08:47:43 +01:00
Gavin Lam
e5920df4da
bug: Fix link file ownership of projected serviceAccountToken
Signed-off-by: Gavin Lam <gavin.oss@tutamail.com>
2026-03-01 15:22:09 -05:00
Daniel Fajmon
b0919d81a0 Promote SELinuxChangePolicy & SELinuxMountReadWriteOncePod to GA 2026-02-27 14:58:14 +01:00
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
Kubernetes Prow Robot
4f87013946
Merge pull request #136330 from atombrella/feature/modernize_slicescontains
Simplify pkg/volume with slices.Contains.
2026-02-20 03:31:38 +05:30
Stephen Kitt
d42d1e3d1f
Deprecate obsolete slice utility functions
... and update users to use standard library functions.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2026-02-16 10:04:33 +01:00
Kubernetes Prow Robot
7f13600dad
Merge pull request #136400 from vinayakankugoyal/gitrepo
KEP:5040 Lock gitRepo Volume Driver to disabled.
2026-02-13 03:58:10 +05:30
Mads Jensen
066b00667a volume: simplify elem check with slices.Contains. 2026-02-05 14:47:40 +01:00
张可10140699
bd7c78107f Fix:NewUnmounter always returns error while deleting pod after node reboot 2026-02-02 10:55:01 +08:00
Kubernetes Prow Robot
5c9977b892
Merge pull request #136202 from RomanBednar/fix-csi-plugin-backoff
csi: raise kubelet CSI init backoff to cover ~140s DNS delays
2026-01-27 15:47:48 +05:30
Vinayak Goyal
cfd7b49484 KEP:5040 Lock gitRepo Volume Driver to disabled. 2026-01-21 21:16:52 -05:00
carlory
dc12e00fd2 remove CheckMigrationFeatureFlags
Signed-off-by: carlory <baofa.fan@daocloud.io>
2026-01-19 11:35:30 +08:00
carlory
be0e68ba84 remove featureGate from PluginManager
Signed-off-by: carlory <baofa.fan@daocloud.io>
2026-01-19 11:35:30 +08:00
carlory
6d1afce678 remove GetHostName func from the VolumeHost interface
Signed-off-by: carlory <baofa.fan@daocloud.io>
2026-01-19 11:35:30 +08:00
carlory
46727c48eb remove portworx from in-tree volume plugins
Signed-off-by: carlory <baofa.fan@daocloud.io>
2026-01-19 11:35:30 +08:00
carlory
c8fc0a1b98 remove CSIMigrationPortworx and InTreePluginPortworxUnregister feature gates
Signed-off-by: carlory <baofa.fan@daocloud.io>
2026-01-19 11:35:29 +08:00
Roman Bednar
53fa7aa1eb csi: raise kubelet CSI init backoff to cover ~140s DNS delays
- 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
2026-01-14 12:05:09 +01:00
张可10140699
ab19ec1bfc Fix:globalmount path may be residual while pod creation-deletion 2026-01-08 08:36:40 +08:00
Kubernetes Prow Robot
99e77f8c46
Merge pull request #134243 from lucming/lucming/enhan-stsfs-type
fix: Check Statfs_t type using unix package only
2025-12-20 15:48:31 -08:00
hongkang
6910bc7bb0 Fix VolumeAttachment cleanup when AttachRequired changes
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>
2025-12-19 15:51:45 +08:00
Patrick Ohly
ad79e479c2 build: remove deprecated '// +build' tag
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
2025-12-18 12:16:21 +01:00
Kubernetes Prow Robot
0c17bcb630
Merge pull request #134926 from m4rc0555/fix-typo-iscsi-provideded
Fix typo in iscsi.go comment: provideded -> provided
2025-12-18 00:29:17 -08:00
Kubernetes Prow Robot
8362ec56da
Merge pull request #134441 from humblec/kubelet-volume
Record proper orphaned pod cleanup error based on the system call
2025-12-17 16:26:18 -08:00
Kubernetes Prow Robot
1187749524
Merge pull request #133719 from carlory/removeMaxAttachLimit
clean up removeMaxAttachLimit
2025-12-17 16:25:40 -08:00
lucming
9c3167d3cc fix: Check Statfs_t type using unix package only 2025-12-02 12:28:40 +08:00
carlory
8be985d4fa
kubelet: fix concurrent map write error when creating a pod with empty volumes when the LocalStorageCapacityIsolationFSQuotaMonitoring feature-gate is enabled 2025-11-06 16:23:04 +08:00
Ankit Gohil
fa31a593b9 Clean up event messages for errors in Portworx in-tree driver 2025-11-03 22:38:58 +00:00
Humble Devassy Chirammal
902c652ccb Record proper orphaned pod cleanup error based on the system call
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>
2025-11-01 11:35:27 +05:30
Kubernetes Prow Robot
b6e7ee359d
Merge pull request #134644 from vikasbolla/fix_change_permission
Fix volume mount changePermissions test flake
2025-10-28 19:08:00 -07:00
marco aeppli
ce828ccf28 Fix typo in iscsi.go comment: provideded -> provided 2025-10-28 12:32:18 +01:00
Anish Ramasekar
30a6d4b389
Add CSI driver opt-in for service account tokens via secrets field
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2025-10-24 11:04:02 -07:00
Kubernetes Prow Robot
7498131d5e
Merge pull request #131098 from DataDog/fricounet/upstream/race-csinode-creation
Wait for CSINode removal to register CSI plugin
2025-10-23 11:35:35 -07:00
Baptiste Girard-Carrabin
28507d0e92
[test] Add case for existing driver on old csi node
The driver on the old object should not appear on the new one because it represented a different node
2025-10-23 10:44:55 +02:00
Baptiste Girard-Carrabin
a14230ae82
[test] Validate migration annotation are still applied 2025-10-23 10:28:51 +02:00
Vikas
c7eb3751b9 Fix volume mount changePermissions test flake 2025-10-16 15:25:57 +05:30
Carlos Panato
96a9fe5f7b
update debian-base and setcap
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2025-10-15 09:42:15 +02:00
Kubernetes Prow Robot
5b3bbd89e6
Merge pull request #134144 from swagatbora90/fix-kubeletnull-crash
change klog to log volume name instead of entire spec in GetDeviceMountPath
2025-10-10 09:21:00 -07:00
Kubernetes Prow Robot
a20a9a4113
Merge pull request #133599 from eltrufas/block-transient
Mark API server errors as transient in csi raw block driver
2025-10-08 05:29:02 -07:00
Rafael Castillo
f99d0e9759 Mark API server errors as transient in csi raw block driver
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.
2025-10-08 02:39:01 +00:00
Baptiste Girard-Carrabin
cb01a28df4
Ensure CSINode is owned by node when installing CSI drivers
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.
2025-10-07 11:00:55 +02:00
Baptiste Girard-Carrabin
328f9da729
Add current and old nodeIDs in log messages
Refactor the nodeOwnsCSINode function to also outputs the current owner ID so that it can be logged afterwards.
2025-10-07 10:03:13 +02:00
Humble Devassy Chirammal
2ddc955558 correct metrics function comments
Signed-off-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
2025-10-03 17:11:54 +05:30
Humble Devassy Chirammal
c4ec18b58a pkg/volume: improve code style and readability
- 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>
2025-09-27 20:18:08 +05:30
Humble Devassy Chirammal
ad8f91fb0f Fix error messages in volume path handler
Signed-off-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
2025-09-25 22:37:03 +05:30
Swagat Bora
9d5ddd9fac change klog to log volume name instead of entire spec in GetDeviceMountPath
Signed-off-by: Swagat Bora <sbora@amazon.com>
2025-09-18 23:47:06 +00:00