Meridio
Meridio copied to clipboard
Alternative to StatefulSetAutoDeletePVC
Is your feature request related to a problem? Please describe.
This issue is a follow-up to these: https://github.com/Nordix/Meridio/pull/362 https://github.com/Nordix/Meridio/issues/361
The current implementation using the persistentVolumeClaimRetentionPolicy
property in the StatefulSet specs requires the users to run on at least, Kubernetes v1.23 with the feature gate StatefulSetAutoDeletePVC
enabled. This feature, as of Kubernetes v1.26 is still in alpha and disabled by default. Here is a PR to move it to beta: https://github.com/kubernetes/kubernetes/pull/111300. And here is the documentation: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention
Without this enabled, users will still face the issue described here: https://github.com/Nordix/Meridio/issues/361
Describe the solution you'd like When delting a trench, the operator must delete the PVC assigned to the NSP and IPAM. Deleting the PVC will automatically delete the PV (so no API access needed for this).
This will require the operator to have access to another Kubernetes API function to detete the PVC (PVC is a namespaced resource).
Describe alternatives you've considered /
Additional context /