-
Notifications
You must be signed in to change notification settings - Fork 38.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If a pvc has an empty storageclass name, don't try to assign a default StorageClass #122704
If a pvc has an empty storageclass name, don't try to assign a default StorageClass #122704
Conversation
Skipping CI for Draft Pull Request. |
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @saad-ali |
/cc @RomanBednar |
@carlory My memory is kinda blurry on this but I believe we agreed on allowing updates only from nil values: https://github.com/kubernetes/kubernetes/pull/111467/files#diff-c713e8919642d873fdf48fe8fb6d43e5cb2f53fd601066ff53580ea655948f0dR2242 That means the controller should not attempt to update from |
For historical reasons, there are two ways for a PVC to specify a storage class : Option 1: set Before kubernetes v1.25, it is impossible to set a storage class for a pending PVC after the PVC is created.
So, it's very inconvenient for users to make a Pending PVC to be Bound when no storage class is specified in the PVC manifest. In this case, users have to delete the PVC and recreate it with a storage class specified. Thanks to KEP-3333, the The KEP also introduces a behavior change: It changes the meaning of so, the controller shouldn't assgin a default storage class to a pending PVC if the |
…t StorageClass to it.
e75c68b
to
8af9a17
Compare
cc @RomanBednar |
I believe this is correct, and it matches the validation - updating from nil with beta annotation would fail and so would update from I'd like to get more eyes on this though, @jsafrane can you please take a look? |
/lgtm |
LGTM label has been added. Git tree hash: 2d7cb7b72ec95b7988586f507903a48903b68402
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: carlory, jsafrane The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I cherry-pick this PR into 1.29, 1.28, 1.27 and 1.26. FYI:
|
…704-upstream-release-1.26 Automated cherry pick of #122704: If a pvc has an empty storageclass name, don't try to assign
…704-upstream-release-1.29 Automated cherry pick of #122704: If a pvc has an empty storageclass name, don't try to assign
…704-upstream-release-1.28 Automated cherry pick of #122704: If a pvc has an empty storageclass name, don't try to assign
…704-upstream-release-1.27 Automated cherry pick of #122704: If a pvc has an empty storageclass name, don't try to assign
What type of PR is this?
/kind bug
What this PR does / why we need it:
kube-controller-manager log is https://storage.googleapis.com/kubernetes-jenkins/pr-logs/pull/121895/pull-kubernetes-e2e-kind-alpha-features/1745322068624281600/artifacts/kind-control-plane/pods/kube-system_kube-controller-manager-kind-control-plane_adb1f34692d5d1ca5fb847c6cb9a07eb/kube-controller-manager/0.log.20240111-061905
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: