Add Delete Volume Finalizer
This PR adds Finalizer on the snapshot source PVC to prevent it from being deleted when a snapshot is being created from it.
This commit is contained in:
@@ -75,6 +75,9 @@ var snapshotterSecretParams = deprecatedSecretParamsMap{
|
||||
secretNamespaceKey: prefixedSnapshotterSecretNamespaceKey,
|
||||
}
|
||||
|
||||
// Name of finalizer on PVCs that have been used as a source to create VolumeSnapshots
|
||||
const PVCFinalizer = "snapshot.storage.kubernetes.io/pvc-protection"
|
||||
|
||||
func snapshotKey(vs *crdv1.VolumeSnapshot) string {
|
||||
return fmt.Sprintf("%s/%s", vs.Namespace, vs.Name)
|
||||
}
|
||||
|
Reference in New Issue
Block a user