-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore PVs regardless of the reclaim policy #6850
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: lou <[email protected]>
Signed-off-by: lou <[email protected]>
pkg/restore/restore.go
Outdated
@@ -1826,11 +1829,45 @@ func hasPodVolumeBackup(unstructuredPV *unstructured.Unstructured, ctx *restoreC | |||
return found | |||
} | |||
|
|||
func hasRestorePVAnnotation(unstructuredPV *unstructured.Unstructured, ctx *restoreContext) bool { | |||
annotation, ok := ctx.restore.GetAnnotations()["velero.io/restore-pvs"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any new annotations should go in https://github.com/vmware-tanzu/velero/blob/main/pkg/apis/velero/v1/labels_annotations.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, moved
Signed-off-by: lou <[email protected]>
@27149chen Could you open an issue for this use case and involve more maintainers to discuss? We have so many different kinds of customization logic to handle different use cases which we try to avoid. If this isn't a common case, we'd like to not introduce such changes. |
@ywk253100 issue created: #6864 |
Please add a summary of your change
This pr want to handle the following use case
spec.csi.volumeHandle
should not be changed, so pv must be restored, not recreatedthe solution is:
velero.io/restore-pvs: pv1,pv2,pv3
Does your change fix a particular issue?
Fixes #6864
Please indicate you've done the following:
/kind changelog-not-required
as a comment on this pull request.site/content/docs/main
.