-
Notifications
You must be signed in to change notification settings - Fork 292
Description
Is your feature request related to a problem?/Why is this needed
I use both csi-driver-nfs and kubernetes-sigs/nfs-subdir-external-provisioner. I miss the feature from the subdir-external-provisioner that deleted volumes can be "archived" on the NFS share. Archive means renaming the root directory of the PV from pvc-1234 to archived-pvc-1234.
Describe the solution you'd like in detail
It is implemented here:
https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner/blob/3740e016212145125285ee14667e7ab14e61b406/cmd/nfs-subdir-external-provisioner/provisioner.go#L172-L188
The archiving functionality is enabled when parameters.archiveOnDelete is set to true on the StorageClass:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
annotations:
storageclass.kubernetes.io/is-default-class: "true"
labels:
# ..
chart: nfs-subdir-external-provisioner-4.0.17
name: nfs-data
allowVolumeExpansion: true
parameters:
archiveOnDelete: "true" # <------------------------------- see here
provisioner: cluster.local/nfs-data-provisioner
reclaimPolicy: Delete
volumeBindingMode: ImmediateDescribe alternatives you've considered
still use the kubernetes-sigs/nfs-subdir-external-provisioner when archiving is needed.
Additional context
none