This PR adds some code to cleanup VolumeSnapshots and Backup objects from the cluster after the defined volume_snapshot_retention_peroid config value.
Adds the volume_snapshot_retention_period_days value with a default of 40. This is in line with our current retention for object store backups in AWS and GCP.
Checks for all Backup method types of volumeSnapshot older than volume_snapshot_retention_period_days. Then looks up the associated VolumeSnapshot
Deletes the Backup then will delete the VolumeSnapshot if successful.
This is to fix an issue we are seeing with the snapshot-controller handling too many snapshots on the cluster and in our cloud services. CNPG currently doesn't support deleting snapshots after some retention period.
This PR adds some code to cleanup
VolumeSnapshots
andBackup
objects from the cluster after the definedvolume_snapshot_retention_peroid
config value.volume_snapshot_retention_period_days
value with a default of40
. This is in line with our current retention for object store backups in AWS and GCP.Backup
method types ofvolumeSnapshot
older thanvolume_snapshot_retention_period_days
. Then looks up the associatedVolumeSnapshot
Backup
then will delete theVolumeSnapshot
if successful.This is to fix an issue we are seeing with the snapshot-controller handling too many snapshots on the cluster and in our cloud services. CNPG currently doesn't support deleting snapshots after some retention period.
fixes: PRO-2209