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
Do not assume storageclass is still in-tree after csi migration #94489
Conversation
Hi @ialidzhikov. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/sig storage |
/priority important-soon |
I think there's a general problem that users can recreate storageclasses with the same name, but completely change the contents of the StorageClass, which may invalidate the PV.spec.storageclassname on existing PVs. This is why we do not rely on StorageClass after PV creation, and perhaps this |
Yep, I agree. This PR improves the volume expand controller wrt that. |
@gnufied , @leakingtapan , @msau42 did you managed to check this PR? |
ebcb21d
to
7b53eca
Compare
7b53eca
to
8735453
Compare
8735453
to
9914f7e
Compare
@msau42 , if you don't have objections, can we add |
/milestone v1.20 Will let @gnufied review |
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
0a802eb
to
3bc5602
Compare
/assign @deads2k |
/lgtm |
@msau42 , I think we are back to you (or someone else that can assist with review/approval). |
/approve |
/assign @deads2k for controller manager approval |
kcm change lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, ialidzhikov, msau42 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 |
/test pull-kubernetes-bazel-test |
…94489-upstream-release-1.19 Automated cherry pick of #94489: Do not assume storageclass is still in-tree after csi migration
…94489-upstream-release-1.18 Automated cherry pick of #94489: Do not assume storageclass is still in-tree after csi
…94489-upstream-release-1.17 Automated cherry pick of #94489: Do not assume storageclass is still in-tree after csi
What type of PR is this?
/kind bug
What this PR does / why we need it:
Volume expand controller is responsible for setting the
volume.kubernetes.io/storage-resizer
annotation for migrated volume. However currently the controller relies that the PVC StorageClass will be still the in-tree (legacy) one. Basically it currently tries to fetch the PVC StorageClass, it gets the StorageClassprovisioner
(and assumes that it is the in-tree one), then tries to get the csi plugin name by in-tree plugin name.Often after csi migration users replace their legacy StorageClasses with the new out-of-tree. If that is the case, the volume_expand controller fails to set the
volume.kubernetes.io/storage-resizer
annotation and volume resize for a migrated volume fails. I couldn't find a statement that deleting the legacy storageclass and recreating the out-of-tree one with the same name is forbidden and not supposed to happen by the csi contract. Feel free to correct me if it is.With the PR, volume expand controller is adapted to get the in-tree plugin name from the PV spec (not from the PVC StorageClass provisioner).
Which issue(s) this PR fixes:
Fixes #94189
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: