Description
User Story
As a user of CSI volumesnapshots, I would like to use the volumesnapshots to recover from (intentional/unintentional) deletion of my Kubernetes workloads without having to indefinitely retain all of the volumesnapshots.
Detailed Description
Without using the DeletionPolicy: Retain
an accidental deletion of the kubernetes namespace will trigger a cascading delete of volumesnapshots all the way through to the storage provider and there is no recovery from this.
However, using a DeletionPolicy: Retain
can result in an increasing count of volumesnapshots.
Decoupling the lifecycle of the volumesnapshot kubernetes objects from that of the volume snapshots in the storage provider is a good middle ground between the two scenarios.
Proposal
A new CSI driver parameter could be introduced for TTL, of volume snapshots, to decouple the lifecycle of the volumesnapshot kubernetes objects from that of the volume snapshots in the storage provider. This will be a good middle ground between the two scenarios.
The CSI drivers could possibly store unused volume snapshots (with no volumesnapshotcontent using the snapshot handle) with an expiry longer than that of the kubernetes objects.
This may be something that is common across CSI drivers.
cc @xing-yang