Move pvc annotation removal from CSI RIA to regular PVC RIA #8755
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Combine existing PVC non-CSI RIAs and move annotation removal out of the CSI plugin to fix issues with
CSI volumes when using fs-backup
Thank you for contributing to Velero!
Please add a summary of your change
The CSI RIA plugin removed several annotations on restore. Because the CSI plugin exits early without action when not restoring via CSI snapshot or datamover, these annotations were not removed when CSI volumes were restored via fs-backup. For the linked issue, this meant that restoring to a cluster with a different CSI driver would fail when using fs-backup. These annotations should always be removed, not just when using CSI snapshots, so this code needed to be moved to a regular RIA that runs in all cases.
There were already two non-CSI RIA plugins for PVCs. Rather than create a third one, this PR combines those into one, to avoid needing 3 different grpc calls -- the CSI plugin remains separate.
Because the non-CSI plugin already handled selected node in a more targeted way (already documented process for explicit node change via configmap, and if there is no configmap and the selected node does not exist in restore cluster, then the annotation is removed), the migrated annotation removal functionality no longer applies to the selected node, so now the behavior will match documented behavior in all cases.
Does your change fix a particular issue?
Fixes #8731
Please indicate you've done the following:
make new-changelog
) or comment/kind changelog-not-required
on this PR.site/content/docs/main
.