dynamic-nfs-provisioner
dynamic-nfs-provisioner copied to clipboard
Support PV Deletion protection finalizer
Describe the problem/challenge you have
Current there is a k8s bug:
If delete PV prior to deleting PVC, then the Reclaim policy is not exercised. As a result of this behavior, the associated storage asset in the external infrastructure is not removed.
For openebs nfs provisioner, that means the backend kinds of stuff (PV, PVC, deployment and service) are all left behind.
A feature gate HonorPVReclaimPolicy was added in kubernetes 1.23 to resolve such issue, refer to the KEP https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/2644-honor-pv-reclaim-policy
sig-storage-lib has already changed to support PV Deletion protection finalizer https://github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/pull/117
Hope openebs can support this KEP.
Describe the solution you'd like
I think setting AddFinalizer to true when instantiating the nfs provisioner controller and upgrading the sig-storage library from v7 to v8 should be fine.
https://github.com/openebs/dynamic-nfs-provisioner/blob/1f414468b8c53b974c5dddbe02357a6ceb97d3b9/provisioner/controller.go#L70
Environment:
- OpenEBS version (use
kubectl get po -n openebs --show-labels
): v0.9.0 - Kubernetes version (use
kubectl version
): v1.23.6.
Vote on this issue!
This is an invitation to the OpenEBS community to vote on issues.
Use the "reaction smiley face" up to the right of this comment to vote.
- :+1: for "The project would be better with this feature added"
- :-1: for "This feature will not enhance the project in a meaningful way"