kubernetes-sigs / azurefile-csi-driver

Azure File CSI Driver
Apache License 2.0
147 stars 136 forks source link

Allow PV Finalizer to be removed #1923

Closed serge-teladochealth closed 1 week ago

serge-teladochealth commented 2 weeks ago

Is your feature request related to a problem?/Why is this needed

We currently create a pv and it is attached to a specific fileshare this is an operation that overrides the default behavior of the pv creating a fileshare per pv, this is a behavior that is currently required. When we delete the pv the finalizer attempts to remove the underlining fileshare. We would like to make it so this does not happen. For the time being we have added a lock on the storage account so that it cannot remove the fileshare. We would like the ability to remove the finalizer so it does not remove the fileshare. The delete action is currently attempting many times so much so that our account is getting throttled and it is affecting other services from being provisioned such as attaching azure disks.

Describe the solution you'd like in detail

We are open to any suggestions on this.

Describe alternatives you've considered

We have implemented a lock on our storage account but we do not see this as a long term fix.

Additional context

andyzhangx commented 2 weeks ago

pls set persistentVolumeReclaimPolicy: Retain in pv: https://github.com/kubernetes-sigs/azurefile-csi-driver/blob/a0b83d7e4f9fe93e9748faffec1e22deef9ac78b/deploy/example/pv-azurefile-csi.yaml#L13C3-L13C40, so after pv deletion, the underlying file share won't be deleted

serge-teladochealth commented 1 week ago

pls set persistentVolumeReclaimPolicy: Retain in pv: https://github.com/kubernetes-sigs/azurefile-csi-driver/blob/a0b83d7e4f9fe93e9748faffec1e22deef9ac78b/deploy/example/pv-azurefile-csi.yaml#L13C3-L13C40, so after pv deletion, the underlying file share won't be deleted

Thank you for your help!!