-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Matches single without selector #46588
Matches single without selector #46588
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wojtek-t
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
@k8s-bot pull-kubernetes-e2e-kops-aws test this |
@@ -65,16 +65,42 @@ func (s *SelectionPredicate) MatchesLabelsAndFields(l labels.Set, f fields.Set) | |||
return matched | |||
} | |||
|
|||
// TODO: should be namespace.name | |||
const matchesSingleField = "metadata.name" |
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.
Why should this be namespace.name
?
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.
I copied it from the other place. I'm not sure why it was there.
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's wrong - "metadata.name" is the correct field ({"metadata":{"name": ...}}
). Strip it and this 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.
Done.
One question |
1e9c3c7
to
f93a270
Compare
Applying label based on @smarterclayton comment above - thanks! |
@wojtek-t: The following test(s) failed:
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
@k8s-bot pull-kubernetes-e2e-gce-etcd3 test this |
Automatic merge from submit-queue (batch tested with PRs 45327, 46217, 46377, 46428, 46588) |
I may have regressed / altered the behavior of this with the initializers pull. Most calls have to use a predicate for filtering out uninitialized resources, so I'm unsure whether this still gets the benefit you expected. |
@smarterclayton - thanks for the update. And no worries, the gain will be smaller, but there should still be some. And it wasn't critical to anything. |
This is reducing cpu-usage of apiserver by ~5% in 5000-node clusters.