-
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
Support for in-tree PV Deletion protection finalizer #108400
Support for in-tree PV Deletion protection finalizer #108400
Conversation
@deepakkinni: 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. |
cae69af
to
655653a
Compare
655653a
to
5b33e56
Compare
/retest |
1 similar comment
/retest |
/assign @jsafrane @xing-yang |
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.
I also miss an e2e test for this feature - can it be tested with a hostpath volume?
5b33e56
to
62c6979
Compare
Now that I think about an e2e test, maybe iSCSI or NFS might be a better choice. We don't support deletion of these volumes in-tree. Hence, create a PV that looks like iSCSI, but it does not need to represent any actual volume (and don't use it in a Pod). Set its ReclaimPolicy to Delete or Retain, check it gets the finalizer, delete it, check it's not deleted (Delete policy) / it is deleted (Retain) and that could be it for the "easy" cases. The hard case is to ensure that if user deletes a PV, the finalizer is removed after PV controller / external-provisioner deletes the corresponding volume. Hence you need a way how to check the volume is really deleted. We don't have a good way how to do it. For CSI, HostPath CSI driver + deletion hooks could work, for in-tree I don't see an easy way. It can be in a separate PR. |
Signed-off-by: Deepak Kinni <dkinni@vmware.com>
62c6979
to
d37f14d
Compare
Thanks, it's a bit more complicated than I anticipated, will have the tests in a separate PR. This PR will have only the unit tests. |
/lgtn |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deepakkinni, 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 |
@@ -943,7 +944,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS | |||
JobMutableNodeSchedulingDirectives: {Default: true, PreRelease: featuregate.Beta}, | |||
IdentifyPodOS: {Default: false, PreRelease: featuregate.Alpha}, | |||
PodAndContainerStatsFromCRI: {Default: false, PreRelease: featuregate.Alpha}, | |||
HonorPVReclaimPolicy: {Default: false, PreRelease: featuregate.Alpha}, | |||
HonorPVReclaimPolicy: {Default: false, PreRelease: featuregate.Beta}, |
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.
@jsafrane This is not enabled by default? I thought only an API object is subject to this new change that Beta means disabled by default.
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.
This is from the email announcing Beta API off by default: https://groups.google.com/a/kubernetes.io/g/dev/c/tkzbBcS0JI8
Beta feature gates remain on by default and beta fields on stable APIs remain on by default.
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.
you're right, it should be enabled by default. @deepakkinni, can you please fix it?
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.
Sure, I'll work on it.
What type of PR is this?
/kind feature
/sig storage
What this PR does / why we need it:
Support for in-tree volume deletion protection as a part of kubernetes/enhancements#2644
Which issue(s) this PR fixes:
Fixes # kubernetes/enhancements#2644
Special notes for your reviewer:
Testing done:
kubernetes.io/pv-controller
is present on the PVDoes this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
Signed-off-by: Deepak Kinni dkinni@vmware.com