-
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
Include --annotations flag in backup and restore create commands #8354
Conversation
This commit implements a new --annotations flag in the backup and restore create commands. This allows users to specify key-value pairs for annotations directly at the time of backup and restore creation, in the same way as the --labels flag. Signed-off-by: Alvaro Romero <[email protected]>
5b4706f
to
e2839bb
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8354 +/- ##
=======================================
Coverage 58.97% 58.98%
=======================================
Files 367 367
Lines 38876 38881 +5
=======================================
+ Hits 22928 22933 +5
Misses 14486 14486
Partials 1462 1462 ☔ View full report in Codecov by Sentry. |
I know it is a bit old but I couldn't tell what the PR does. AFAICT, backup/restore CRs don't support resource selection by annotations so what exactly is the result of passing this option to "create" commands? I am sure I missing something here. |
@draghuram this doesn't have anything to do with resource selection. This simply allows the user to add annotations to the backup CR -- without this PR, the use case here would require manually creating the backup CR via As noted on the related issue, the more specific use case is "a third-party BackupItemAction plugin modifies its behavior based on annotations on the Backup CR, this PR allows those annotations to be set via |
Thanks, it is clear now. |
Thank you for contributing to Velero!
Please add a summary of your change
This Pull Request implements a new
--annotations
flag in the backup and restore create commands.This allows users to specify key-value pairs for annotations directly at the time of backup and restore creation, in the same way as the
--labels
flag.Usage example:
For restore:
Does your change fix a particular issue?
Fixes #8350
Please indicate you've done the following:
make new-changelog
) or comment/kind changelog-not-required
on this PR.site/content/docs/main
.