-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add multiple label selector support to Velero Backup and Restore APIs #4650
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
Add multiple label selector support to Velero Backup and Restore APIs #4650
Conversation
51f367b
to
939175a
Compare
939175a
to
a9bc0c3
Compare
In addition to my inline comments, I wish to suggest finding a better naming for the fields in the CRD and variable names in the code. Currently, after the PR is merged, we'll have co-existence of |
8011eae
to
eaa76d7
Compare
5a9652c
to
75d19c3
Compare
75d19c3
to
7515350
Compare
Codecov Report
@@ Coverage Diff @@
## main #4650 +/- ##
==========================================
- Coverage 41.37% 41.19% -0.19%
==========================================
Files 204 204
Lines 17943 18113 +170
==========================================
+ Hits 7424 7461 +37
- Misses 9972 10103 +131
- Partials 547 549 +2
Continue to review full report at Codecov.
|
e4bf5fb
to
7442f72
Compare
5f13068
to
cd5741b
Compare
e2b3511
to
a8ad524
Compare
} | ||
|
||
// Listing items for labelSelector (singular) | ||
if len(orLabelSelectors) == 0 { |
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.
it seems when len(orLabelSelectors) == 0
and you choose to use labelSelector
, the logic is almost identical to the case when there's only one element in the orLabelSelectors
?
Why not combine them into one func, that takes the slice of label selectors as a param and returns the unstructuredItems
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.
Thanks @reasonerjt I have updated the PR, please take another look.
Signed-off-by: Shubham Pampattiwar <[email protected]> remove backup CLI bits Signed-off-by: Shubham Pampattiwar <[email protected]> labelselectors spec option for velero restore Signed-off-by: Shubham Pampattiwar <[email protected]> add changelog file Signed-off-by: Shubham Pampattiwar <[email protected]> update spec name to OrLabelSelectors Signed-off-by: Shubham Pampattiwar <[email protected]> minor fixes Signed-off-by: Shubham Pampattiwar <[email protected]> add validations for labelSelector and orLabelSelectors Signed-off-by: Shubham Pampattiwar <[email protected]> update crds.gp after fixing conflicts Signed-off-by: Shubham Pampattiwar <[email protected]> fix CI and add unit tests Signed-off-by: Shubham Pampattiwar <[email protected]> updated OrLabelSelector spec description and added validation failure unit tests Signed-off-by: Shubham Pampattiwar <[email protected]> add comments and change log level Signed-off-by: Shubham Pampattiwar <[email protected]> update site docs Signed-off-by: Shubham Pampattiwar <[email protected]> wrap pager client calls in a function Signed-off-by: Shubham Pampattiwar <[email protected]> resolve confilcts and update crds.go Signed-off-by: Shubham Pampattiwar <[email protected]> rebase and update crds.go Signed-off-by: Shubham Pampattiwar <[email protected]> combine listing items for a given label Signed-off-by: Shubham Pampattiwar <[email protected]>
a8ad524
to
bfdb68a
Compare
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, thanks @shubham-pampattiwar
Shubham Pampattiwar has made several contributions to Velero, most recently in designing and implementing two v1.9 features, including the following: - [Add design for enabling multiple label support[(vmware-tanzu#4619) - [Add multiple label selector support to Velero Backup and Restore APIs](vmware-tanzu#4650) - [Add design for enabling support for ExistingResourcePolicy to restore API](vmware-tanzu#4613) - [Add existingResourcePolicy to Restore API](vmware-tanzu#4628) Signed-off-by: Scott Seago <[email protected]>
Shubham Pampattiwar has made several contributions to Velero, most recently in designing and implementing two v1.9 features, including the following: - [Add design for enabling multiple label support](vmware-tanzu#4619) - [Add multiple label selector support to Velero Backup and Restore APIs](vmware-tanzu#4650) - [Add design for enabling support for ExistingResourcePolicy to restore API](vmware-tanzu#4613) - [Add existingResourcePolicy to Restore API](vmware-tanzu#4628) Signed-off-by: Scott Seago <[email protected]>
Shubham Pampattiwar has made several contributions to Velero, most recently in designing and implementing two v1.9 features, including the following: - [Add design for enabling multiple label support](vmware-tanzu#4619) - [Add multiple label selector support to Velero Backup and Restore APIs](vmware-tanzu#4650) - [Add design for enabling support for ExistingResourcePolicy to restore API](vmware-tanzu#4613) - [Add existingResourcePolicy to Restore API](vmware-tanzu#4628) Shubham has also been driving forward the data mover requirements and design discussions for velero 1.10: - [Add datamover design](vmware-tanzu#4768) Signed-off-by: Scott Seago <[email protected]>
Shubham Pampattiwar has made several contributions to Velero, most recently in designing and implementing two v1.9 features, including the following: - [Add design for enabling multiple label support](vmware-tanzu#4619) - [Add multiple label selector support to Velero Backup and Restore APIs](vmware-tanzu#4650) - [Add design for enabling support for ExistingResourcePolicy to restore API](vmware-tanzu#4613) - [Add existingResourcePolicy to Restore API](vmware-tanzu#4628) Shubham has also been driving forward the data mover requirements and design discussions for velero 1.10: - [Add datamover design](vmware-tanzu#4768) Signed-off-by: Scott Seago <[email protected]>
Shubham Pampattiwar has made several contributions to Velero, most recently in designing and implementing two v1.9 features, including the following: - [Add design for enabling multiple label support](vmware-tanzu#4619) - [Add multiple label selector support to Velero Backup and Restore APIs](vmware-tanzu#4650) - [Add design for enabling support for ExistingResourcePolicy to restore API](vmware-tanzu#4613) - [Add existingResourcePolicy to Restore API](vmware-tanzu#4628) Shubham has also been driving forward the data mover requirements and design discussions for velero 1.10: - [Add datamover design](vmware-tanzu#4768) Signed-off-by: Scott Seago <[email protected]>
Signed-off-by: Shubham Pampattiwar [email protected]
Thank you for contributing to Velero!
Please add a summary of your change
The PR follows the approach specified in the multiple label support design and does the following:
labelSelectors
(plural)labelSelectors
(plural) spec optionlabelSelectors
(plural) option when specified via APIDoes your change fix a particular issue?
Fixes #1508
Please indicate you've done the following:
/kind changelog-not-required
as a comment on this pull request.site/content/docs/main
.