mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-06-09 07:42:42 +00:00
Merge pull request #4976 from reasonerjt/vsc-policy-reset-undo
Undo setting the VSC's deletion policy during backup
This commit is contained in:
@@ -1013,8 +1013,6 @@ func (c *backupController) recreateVolumeSnapshotContent(vsc *snapshotv1api.Volu
|
||||
Namespace: "ns-" + string(vsc.UID),
|
||||
Name: "name-" + string(vsc.UID),
|
||||
}
|
||||
// Revert DeletionPolicy to Delete
|
||||
vsc.Spec.DeletionPolicy = snapshotv1api.VolumeSnapshotContentDelete
|
||||
// ResourceVersion shouldn't exist for new creation.
|
||||
vsc.ResourceVersion = ""
|
||||
_, err = c.volumeSnapshotClient.SnapshotV1().VolumeSnapshotContents().Create(context.TODO(), vsc, metav1.CreateOptions{})
|
||||
|
||||
Reference in New Issue
Block a user