FEATURE REQUEST
What happened:
If I delete a pvc the sparse files will stay on the disk.
What you expected to happen:
If I delete a pvc with some optional flag I would like to get rid of all files related to the pvc.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Update: Though deletion/purge was thought of as a cluster administrator activity. It can become an overhead on the admin in dev/test environments for example... when workloads are short-lived and people want to keep a low admin overhead.
One of the ways to solve this would be to add an option/parameter under storage-class.
auto-delete: true (default)
Which will create the pods with option to remove the data directories created under storage pool.
+1
Added the API to perform the delete in jiva ( https://github.com/openebs/jiva/pull/114 ). Need to work on the related workflow through storage policy.
An alternative approach to purging this data could be to launch a job post the PV delete like: kubernetes-incubator/external-storage#711
After jiva based PVC is deleted, the replica folders are cleared. The completed jobs need to be cleared till the K8s support auto deletion of the completed jobs. The jobs can be cleared using the following commands:
kubectl delete jobs -l openebs.io/cas-type=jiva -n <pvc-namespace>
Most helpful comment
Update: Though deletion/purge was thought of as a cluster administrator activity. It can become an overhead on the admin in dev/test environments for example... when workloads are short-lived and people want to keep a low admin overhead.
One of the ways to solve this would be to add an option/parameter under storage-class.
Which will create the pods with option to remove the data directories created under storage pool.