-
Notifications
You must be signed in to change notification settings - Fork 189
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
Attacher reacts for deleted PVs if finalizer is present #218
Conversation
Welcome @rfranzke! |
Hi @rfranzke. Thanks for your PR. I'm waiting for a kubernetes-csi 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. |
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. I like it, however, can you please add an unit test for a migrated volume? Something like this, but with a migrated PV (so create migratedPVWithFinalizer()
):
external-attacher/pkg/controller/csi_handler_test.go
Lines 1190 to 1199 in 9d2cafb
{ | |
name: "VA deleted -> PV finalizer removed", | |
initialObjects: []runtime.Object{pvDeleted(pvWithFinalizer())}, | |
deletedVA: va(false, "", nil), | |
expectedActions: []core.Action{ | |
core.NewPatchAction(pvGroupResourceVersion, metav1.NamespaceNone, testPVName, | |
types.MergePatchType, patch(pvDeleted(pvWithFinalizer()), | |
pvDeleted(pv()))), | |
}, | |
}, |
@rfranzke, are you still working on the fix? IMO it's very close to get merged. |
Yes, sorry, I was busy the last days. I'll finish it tonight. |
Can you please check again? I was not entirely sure what you meant with
Do you consider a migrated PV a PV with the annotation? If so, how is it related to the change? Instead, I added three test cases for the finalizer removal, please check if this is what you meant. |
I did not notice there already is /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jsafrane, rfranzke 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 |
Thanks for approving! Do you want me to open a cherry-pick PR for the |
6613c398 Merge pull request kubernetes-csi#223 from sunnylovestiramisu/update 0e7ae993 Update k8s image repo url 77e47cce Merge pull request kubernetes-csi#222 from xinydev/fix-dep-version 155854b0 Fix dep version mismatch 8f839056 Merge pull request kubernetes-csi#221 from sunnylovestiramisu/go-update 1d3f94dd Update go version to 1.20 to match k/k v1.27 e322ce5e Merge pull request kubernetes-csi#220 from andyzhangx/fix-golint-error b74a5120 test: fix golint error aa61bfd0 Merge pull request kubernetes-csi#218 from xing-yang/update_csi_driver 7563d196 Update CSI_PROW_DRIVER_VERSION to v1.11.0 a2171bef Merge pull request kubernetes-csi#216 from msau42/process cb987826 Merge pull request kubernetes-csi#217 from msau42/owners a11216e4 add new reviewers and remove inactive reviewers dd986754 Add step for checking builds b66c0824 Merge pull request kubernetes-csi#214 from pohly/junit-fixes b9b6763b filter-junit.go: fix loss of testcases when parsing Ginkgo v2 JUnit d4277839 filter-junit.go: preserve system error log 38e11468 prow.sh: publish individual JUnit files as separate artifacts git-subtree-dir: release-tools git-subtree-split: 6613c3980d1e418bebb7bc49d64c977cfff85671
What type of PR is this?
/kind bug
What this PR does / why we need it:
When a
PersistentVolume
gets deleted the external-attacher should consider it in case it has previously added its finalizer to it. Otherwise (for create/update operations), it can continue to only consider it if.spec.csi != nil
.Which issue(s) this PR fixes:
Fixes #217
Special notes for your reviewer:
NONE
Does this PR introduce a user-facing change?: