Remove health annotation from PVC before handing it over to Velero to create the PVC during the restore.
What this PR does / why we need it:
In the case when Velero vSphere Plugin does not handle the restore of the PVC, it hands it over to Velero to create the PVC.
This could happen in the following cases:
(1)
velero backup create test-backup --include-namespaces test-ns --snapshot-volumes=true
velero restore create test-restore --from-backup test-backup --restore-volumes=false
(2)
velero backup create test-backup --include-namespaces test-ns --snapshot-volumes=false
velero restore create test-restore --from-backup test-backup --restore-volumes=true
If the PVC has the health annotation, however, vSphere CSI Driver's webhook on WCP will reject the PVC creation request. So the fix is to remove the annotation before returning it back to Velero.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Removes health annotation from PVC before handing it over to Velero during the restore.
Remove health annotation from PVC before handing it over to Velero to create the PVC during the restore.
What this PR does / why we need it: In the case when Velero vSphere Plugin does not handle the restore of the PVC, it hands it over to Velero to create the PVC. This could happen in the following cases: (1) velero backup create test-backup --include-namespaces test-ns --snapshot-volumes=true velero restore create test-restore --from-backup test-backup --restore-volumes=false (2) velero backup create test-backup --include-namespaces test-ns --snapshot-volumes=false velero restore create test-restore --from-backup test-backup --restore-volumes=true
If the PVC has the health annotation, however, vSphere CSI Driver's webhook on WCP will reject the PVC creation request. So the fix is to remove the annotation before returning it back to Velero.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: