Commit graph

3966 commits

Author SHA1 Message Date
张可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
Kubernetes Prow Robot
8826364a57
Merge pull request #131483 from tallclair/kubeletconfig
Clean up pkg/kubelet/config
2025-09-15 15:54:07 -07:00
Kubernetes Prow Robot
ef4add4509
Merge pull request #133356 from mayuka-c/issue-133175
Replace usage of deprecated ErrWaitTimeout with recommended method across all Pkgs
2025-09-05 06:43:34 -07:00
carlory
36cf728281
Drop SizeMemoryBackedVolumes after the feature GA-ed in 1.32
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-08-29 14:01:39 +08:00
huweiwen
4abd40f6e3 kubelet: multiple volumes reference one PVC in one Pod
Previously, pod with multiple volumes references one PVC is stuck at
ContainerCreating without any error message.
Fixing this by storing multiple OuterVolumeSpecNames per volume
2025-08-28 13:05:07 +08:00
huweiwen
7910cbb884 kubelet/volumeManager: remove outerVolumeSpecName from ASW 2025-08-28 13:05:06 +08:00
huweiwen
146f0c9345 remove MountedVolume.OuterVolumeSpecNames from logs 2025-08-28 13:05:06 +08:00
carlory
2f3e6778ff
clean up removeMaxAttachLimit 2025-08-27 10:58:47 +08:00
Tim Allclair
ff6f4e1f63 Move kubelet config code to kubeletconfig 2025-08-06 12:08:19 -07:00
Mayuka Channankaiah
6c56d2fd1b Replace usage of deprecated ErrWaitTimeout with recommended method across all Pkgs 2025-08-01 14:18:06 +05:30
Eddie
727a6e6db5
Reject pod when attachment limit is exceeded (#132933)
* Reject pod when attachment limit is exceeded

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Record admission rejection

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Fix pull-kubernetes-linter-hints

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Fix AD Controller unit test failure

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Consolidate error handling logic in WaitForAttachAndMount

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Improve error context

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Update admissionRejectionReasons to include VolumeAttachmentLimitExceededReason

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Update status message

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Add TestWaitForAttachAndMountVolumeAttachLimitExceededError unit test

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Add e2e test

Signed-off-by: Eddie Torres <torredil@amazon.com>

* Fix pull-kubernetes-linter-hints

Signed-off-by: Eddie Torres <torredil@amazon.com>

---------

Signed-off-by: Eddie Torres <torredil@amazon.com>
2025-07-24 17:58:54 -07:00
Taahir Ahmed
4624cb9bb9 Pod Certificates: Basic implementation
* Define feature gate
* Define and serve PodCertificateRequest
* Implement Kubelet projected volume source
* kube-controller-manager GCs PodCertificateRequests
* Add agnhost subcommand that implements a toy signer for testing

Change-Id: Id7ed030d449806410a4fa28aab0f2ce4e01d3b10
2025-07-21 21:49:57 +00:00
Kubernetes Prow Robot
99f55ae4ef
Merge pull request #132662 from gnufied/bump-recovery-feature-ga
Bump recovery feature ga
2025-07-17 17:10:25 -07:00
Baptiste Girard-Carrabin
a375b0aa36
Ensure CSINode belongs to current node on init
When a CSI plugin attempts to register on a node, the node checks if the CSINode object exists. If it does but the ownerReference of the CSINode does not match the UID of the current node, possibly because the node object was recreated with the same name, we end up in a race condition where the CSINode object will be updated but subsequently deleted by the GC controller.
In this situation, the CSINode object will be gone and won't be recreated unless the CSI plugin or the kubelet are restarted.
This commit fixes this race by checking that the CSINode object belong to the current node during initialization.
If it doesn't, it means that the CSINode object is left over from a previous node and it must be removed first. Once removed, registration can progress as usual.
2025-07-17 21:10:05 +02:00
Kubernetes Prow Robot
566d6acb70
Merge pull request #131759 from carlory/clean-volumehost
Remove unused GetHostIP method
2025-07-12 05:35:28 -07:00
Hemant Kumar
c126870ebc Bump RecoverVolumeExpansionFailure to GA 2025-07-10 12:19:31 -04:00
Kubernetes Prow Robot
e12f5490cb
Merge pull request #128429 from liyuerich/volumepathhandler
add UT for volumepathhandler
2025-07-07 08:41:25 -07:00
Kubernetes Prow Robot
3fdc11cbe0
Merge pull request #130230 from carlory/cleanup-CSIDriverRegistry
clean up CSIDriverRegistry
2025-07-04 15:25:31 -07:00
Kubernetes Prow Robot
f407bd6d24
Merge pull request #132254 from carlory/cleanup-MountContainers
Cleanup after Alpha feature MountContainers was removed
2025-06-18 17:24:50 -07:00
Kubernetes Prow Robot
9cd3821f16
Merge pull request #124319 from liangyuanpeng/drop-ptr-wrappers-pkg-volume
pkg/volume:  use utils/ptr package instead of utils/pointer
2025-06-18 02:40:51 -07:00
Kubernetes Prow Robot
2689185671
Merge pull request #131542 from carlory/volume-limit-e2e
e2e tests: fix in-tree plugin volume limit
2025-06-17 15:40:50 -07:00
carlory
85bc3cb096 Remove GetExec method from VolumeHost
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-06-13 10:58:37 +08:00
carlory
f0dde38234 Remove pluginName param from GetMounter and GetExec
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-06-12 17:29:17 +08:00