-
Notifications
You must be signed in to change notification settings - Fork 145
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
fix(backup): only delete backups' resources when synchronization #3193
Conversation
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.
Do we need to add a validation/mutation webhook?
If the owner of a Backup/BackupVolume contains LabelLonghornDeleteResourceOnly
, the webhook should add this label for the Backup/BackupVolume as well.
38a629e
to
bfb0e95
Compare
Modified the |
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.
LGTM
@PhanLe1010 Could you review the PR if you have time? Thank you. |
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.
LGTM
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.
Just one nit .
Only delete backups' resources (BackupVolume, BackupBackingImage, SystemBackup, and Backup) when synchronization. Add the label `DeleteCustomResourceOnly`, and delete remote backup data when deleting the corresponding backup resource in the cluster and the label does not exist. ref: longhorn/longhorn 9530 Signed-off-by: James Lu <james.lu@suse.com>
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.
approved
@mergify backport v1.7.x v1.6.x |
✅ Backports have been created
|
I just checked with the image |
@WebberHuang1118, |
Which issue(s) this PR fixes:
Issue # longhorn/longhorn#9530
What this PR does / why we need it:
Only delete backups' resources (BackupVolume, BackupBackingImage, SystemBackup, and Backup) when synchronization.
Add the label
DeleteCustomResourceOnly
, and delete remote backup data when deleting the corresponding backup resource in the cluster and the label does not exist.Special notes for your reviewer:
Additional documentation or context