-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Annotation and label selection in replacement targets #4229
Annotation and label selection in replacement targets #4229
Conversation
@natasha41575: This PR has multiple commits, and the default merge method is: merge. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: natasha41575 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:
Approvers can indicate their approval by writing |
/retest |
Added the hold label just so that @yuwenma can take a look and LGTM without it being merged automatically |
func rejectId(rejects []*types.Selector, id *resid.ResId) bool { | ||
for _, r := range rejects { | ||
if id.IsSelectedBy(r.ResId) { | ||
if !r.ResId.IsEmpty() && id.IsSelectedBy(r.ResId) { |
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.
Is this reason this can be empty now that the rejection may have been defined by selector (handled elsewhere) instead of by GVK? Does one of the existing tests cover the regression if we were to not do this check?
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.
Yes, I added this condition specifically because the reject via labelSelector
test was failing without it.
cdfa337
to
ef5f1d3
Compare
/lgtm |
Adds support for annotation and label selection in replacement targets.
Fixes #4223
/cc @monopole
/cc @KnVerey
ALLOW_MODULE_SPAN