-
Notifications
You must be signed in to change notification settings - Fork 58
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
Exclude PV and PVC in velero backups #1543
Conversation
@@ -371,7 +371,8 @@ func getBackupSpecFromObjectsSpec(objectsSpec kubeobjects.Spec) velero.BackupSpe | |||
IncludedResources: objectsSpec.IncludedResources, | |||
// exclude VRs from Backup so VRG can create them: see https://github.com/RamenDR/ramen/issues/884 | |||
ExcludedResources: append(objectsSpec.ExcludedResources, "volumereplications.replication.storage.openshift.io", | |||
"replicationsources.volsync.backube", "replicationdestinations.volsync.backube"), | |||
"replicationsources.volsync.backube", "replicationdestinations.volsync.backube", | |||
"PersistentVolumeClaims", "PersistentVolumes"), |
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.
This may break user depending on velero backing up pvcs and pvs that ramen does not manage.
Option 1 (using the special velero lable) is little more work, but avoids this issue.
At the point we add and remove the ramen finalizer, we can also add the special velero label.
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.
The exclude and include resources here are per backup(esp. backup-name) and does not effect cluster wide. And our backups are uniquely named. So, ramen manages only this backup and not the others.
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.
Ramen backup is used by recipes that may want to backup other pvcs and pvs that ramen is not protecting. Using the label we can ensure that velero will not backup up or restore the pvs and pvcs we manage, without affecting other pvs and pvcs.
I ran e2e-tests locally and they did not fail. |
Signed-off-by: rakeshgm <[email protected]>
09cda12
to
6fe3c55
Compare
fixes #1540 - used
Option 2
from the issue description to disable PV and PVC backup.