kubevirt / kubevirt-velero-plugin

Plugin to Velero which automates backing up and restoring KubeVirt/CDI objects
Apache License 2.0
32 stars 28 forks source link

Allow skipping restore-specific checks during backup #285

Closed alromeros closed 3 weeks ago

alromeros commented 2 months ago

What this PR does / why we need it:

This Pull Request aims to implement the MetadataBackup label, which allows to bypass restore-specific checks during backup.

This feature allows safely backing up resources such as VirtualMachines and VirtualMachineInstances even when restore conditions are not met, such as when DVs or PVCs are excluded from the backup.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes # https://github.com/kubevirt/kubevirt-velero-plugin/issues/259

Special notes for your reviewer:

Feel free to discuss/oppose the annotation approach. I think this is the cleanest way to ignore restore checks for a specific object, but we may consider other alternatives.

Release note:

Allow skipping restore-specific checks during backup
alromeros commented 1 month ago

Squashed the two commits and addressed the comments about using HasAnnotation. Other than that I'm waiting for input regarding your other comment. Thanks!

mhenriks commented 3 weeks ago

/lgtm /approve

kubevirt-bot commented 3 weeks ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mhenriks

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubevirt/kubevirt-velero-plugin/blob/main/OWNERS)~~ [mhenriks] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment