390 Commits

Author SHA1 Message Date
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
Hemant Kumar
c126870ebc Bump RecoverVolumeExpansionFailure to GA 2025-07-10 12:19:31 -04:00
Hemant Kumar
96b5ae792b Add code for not expanding volume if it has NodeExpansionNotRequired annotation 2025-05-28 13:07:34 -04:00
Hemant Kumar
4654496c39 Add code to not expand certain types of volumes 2025-05-28 10:22:35 -04:00
Hemant Kumar
5da12b5aee Add tests that validate the return value of resize operation 2025-05-16 08:16:24 -04:00
Kubernetes Prow Robot
1f056f8f88 Merge pull request #131495 from carlory/fix-131381
Handle unsupported node expansion for RWX volumes
2025-04-28 10:39:54 -07:00
carlory
dddfeb4a0e Handle unsupported node expansion for RWX volumes
Co-authored-by: Hemant Kumar <gnufied@users.noreply.github.com>
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-04-29 00:19:47 +08:00
Kubernetes Prow Robot
375f282985 Merge pull request #131408 from gnufied/remove-unknown-resizing-error
Remove warning about resizing failed for unknown reason
2025-04-25 09:41:24 -07:00
Hemant Kumar
1db2d6a018 Mark NodeExpansion finsihed without featuregate check 2025-04-23 16:15:10 -04:00
Hemant Kumar
70ebe90b13 Also change final status by removing featuregate check 2025-04-23 16:05:56 -04:00
Hemant Kumar
0e40ed642b Check for newer fields when deciding expansion recovery feature status 2025-04-23 11:37:22 -04:00
Hemant Kumar
90de4b5894 Remove warning about resizing failed for unknown reason 2025-04-22 10:30:51 -04:00
Eddie Torres
c766a52356 Implement KEP 4876 Mutable CSINode (#130007)
* Implement KEP-4876 Mutable CSINode Allocatable Count

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

* Update TestGetNodeAllocatableUpdatePeriod

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

* Implement CSINodeUpdater

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

* Use sync.Once in csiNodeUpdater

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

* ImVerify driver is installed before running periodic updates

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

* Update NodeAllocatableUpdatePeriodSeconds type comment

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

* Leverage apivalidation.ValidateImmutableField in ValidateCSINodeUpdate

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

* Update strategy functions

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

* Run hack/update-openapi-spec.sh

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

* Update VolumeError.ErrorCode field

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

* CSINodeUpdater improvements

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

* Iron out concurrency in syncDriverUpdater

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

* Run hack/update-openapi-spec.sh

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

* Revise logging

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

* Revise log in VerifyExhaustedResource

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

* Update API validation

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

* Add more code coverage

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

* Fix pull-kubernetes-linter-hints

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

* Update API types documentation

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

* Update strategy and validation for new errorCode field

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

* Update validation tests after strategy changes

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

* Update VA status strategy

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

---------

Signed-off-by: torredil <torredil@amazon.com>
2025-03-18 12:45:49 -07:00
Hemant Kumar
49dabe56d0 Monitor progress tracking for permission change 2025-02-24 15:55:37 -05:00
Kubernetes Prow Robot
7667a68b72 Merge pull request #128383 from carlory/cleanup-codes
remove csi translator from volume operation generator
2024-11-07 13:47:46 +00:00
huweiwen
f9a9b6f660 rename Gid => GID
according to stylecheck
2024-11-06 11:11:13 +08:00
Hemant Kumar
2d58d4ef52 Fix unit tests and feature gate stuff 2024-10-30 15:17:59 -04:00
carlory
7e0585c60c clean up csi translator from volume operation generator 2024-10-28 18:27:10 +08:00
Hemant Kumar
a9d71bd6e6 Move RecoverVolumeExpansionFailure feature to beta 2024-10-25 13:39:43 -04:00
carlory
4c10212d7b Fix data race in kubelet/volumemanager 2024-10-08 16:39:02 +08:00
Matthieu MOREL
f736cca0e5 fix: enable expected-actual rule from testifylint in module k8s.io/kubernetes
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-09-27 07:56:31 +02:00
Abhishek Kr Srivastav
95860cff1c Fix Go vet errors for master golang
Co-authored-by: Rajalakshmi-Girish <rajalakshmi.girish1@ibm.com>
Co-authored-by: Abhishek Kr Srivastav <Abhishek.kr.srivastav@ibm.com>
2024-09-20 12:36:38 +05:30
Kubernetes Prow Robot
113b12c6fb Merge pull request #124439 from bells17/csi-translation-lib-structured-and-contextual-logging
Migrate k8s.io/csi-translation-lib/.* to structured logging
2024-08-19 18:13:54 -07:00
Hemant Kumar
26798d24c2 Fix linter hints etc 2024-08-14 12:54:40 -04:00
Hemant Kumar
97eddc8f65 commiting uncommited changes on 2024-08-14 12:46:00 -0400 2024-08-14 12:46:00 -04:00
Hemant Kumar
99fc7cc7b1 Use new size returned by nodeExpander for recording in ASOW 2024-08-14 09:24:53 -04:00
Hemant Kumar
de5e4963c1 Use allocatedResources as new size for finishing volume expansion
on the node.

Also add new tests for node only expansion modes
2024-08-14 09:24:48 -04:00
carlory
c4851c64a0 remove volumeoptions from VolumePlugin and BlockVolumePlugin 2024-07-24 14:07:02 +08:00
Hemant Kumar
f7f1a6c81a Address review comments and return nicer errors 2024-07-22 10:43:38 -04:00
bells17
1298c8a5fe csi-translation-lib: Support structured and contextual logging 2024-07-18 14:01:27 +09:00
Hemant Kumar
b3db0ba04c Fix error about missing volumeSpec for expansion during mount 2024-07-16 12:07:46 -04:00
Hemant Kumar
099cb71a53 Ensure that all options are correctly set when calling node-expand-during-mount 2024-07-16 10:04:19 -04:00
Hemant Kumar
785e68a626 Add code for testing final errors 2024-07-15 15:41:31 -04:00
Hemant Kumar
cbda088905 Add functions for storing volume as failed with final error 2024-07-12 15:14:46 -04:00
Hemant Kumar
7a51999ddf Deprecate intree Volume Expansion controller 2024-07-12 14:42:04 -04:00
Hemant Kumar
ad28dfb42e Fix code that uses old values for resize errors 2024-07-12 14:37:35 -04:00
Hemant Kumar
49e82fd120 Rename ReizeFailed conditions to ResizeInfeasible 2024-07-10 12:02:54 -04:00
carlory
21baa25e1a remove BulkVolumeVerifier interface from volume 2024-05-14 14:17:25 +08:00
Marek Siarkowicz
3ee8178768 Cleanup defer from SetFeatureGateDuringTest function call 2024-04-24 20:25:29 +02:00
Jan Safranek
d7028a8ed5 Add SELinuxMount feature gate
The feature gate enables mounting with -o context=XYZ mount option for all
volume types, not only ReadWriteOncePod.

All SELinux label tracking & error reporting infrastructure is already in
place from SELinuxMountReadWriteOncePod feature gate. This is just a
trivial extension to all access modes.
2024-02-20 15:40:21 +01:00
Kubernetes Prow Robot
2c5105e7b8 Merge pull request #123032 from carlory/fix-122960
fix GenerateUnmapVolumeFunc missing globalUnmapPath
2024-02-02 05:39:03 -08:00
Hemant Kumar
d190fa3e7d Fix race condition between external-resizer and kubelet
This fixes the race condition that could happen because
resize controller just finished volume expansiona and has only
finished marking PV and yet to mark PVC.

The workaround proposed here should not be necessary once
RecoverVolumeExpansionFailure goes GA/beta.
2024-01-31 12:23:56 -05:00
carlory
77fed9d2b7 fix GenerateUnmapVolumeFunc missing globalUnmapPath when kubelet tries to clean up all volumes that failed reconstruction. 2024-01-30 17:29:54 +08:00
Kubernetes Prow Robot
d250588077 Merge pull request #121825 from carlory/clean-113
remove duplicated check in operator_generator.go
2024-01-05 16:52:13 +01:00
carlory
5607349e39 remove wrong warning event (FileSystemResizeFailed) during a pod creation when it uses a readonly volume. 2023-12-28 17:49:02 +08:00
Hemant Kumar
e706b6ba14 Use a separate function for checking if device was reconstructed 2023-12-14 11:37:47 -05:00
Hemant Kumar
56dd5ab10f Add tests for checking of uncertain device paths 2023-12-11 17:15:16 -05:00
Hemant Kumar
ed0facacfa Fix device uncertain errors on reboot 2023-12-06 22:19:14 -05:00
carlory
407b9d9610 remove duplicated check in operator_generator.go 2023-11-09 15:38:49 +08:00
Chris Henzie
2dbd405583 Graduate ReadWriteOncePod to GA 2023-10-20 10:40:39 -07:00