Skip to content

Commit

Permalink
Merge pull request #180 from shubham-pampattiwar/remove-vs-annotation
Browse files Browse the repository at this point in the history
Remove VS name annotation from PVC during CSI restore
  • Loading branch information
shubham-pampattiwar committed Jul 12, 2023
2 parents 8293c30 + 453b67b commit cf77ddf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/restore/pvc_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ func (p *PVCRestoreItemAction) Execute(input *velero.RestoreItemActionExecuteInp

operationID := ""

// remove the volumesnapshot name annotation as well
removePVCAnnotations(&pvc, []string{util.VolumeSnapshotLabel})

if boolptr.IsSetToFalse(input.Restore.Spec.RestorePVs) {
logger.Info("Restore did not request for PVs to be restored from snapshot")
pvc.Spec.VolumeName = ""
Expand Down

0 comments on commit cf77ddf

Please sign in to comment.