Skip to content
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

Merged

Conversation

wojtek-t
Copy link
Member

This is reducing cpu-usage of apiserver by ~5% in 5000-node clusters.

@wojtek-t wojtek-t added the release-note-none Denotes a PR that doesn't merit a release note. label May 29, 2017
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 29, 2017
@wojtek-t wojtek-t added the sig/scalability Categorizes an issue or PR as relevant to SIG Scalability. label May 29, 2017
@wojtek-t wojtek-t added this to the v1.7 milestone May 29, 2017
@k8s-github-robot
Copy link

[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 /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 29, 2017
@wojtek-t
Copy link
Member Author

@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"
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@smarterclayton
Copy link
Contributor

One question

@wojtek-t wojtek-t force-pushed the matches_single_without_selector branch from 1e9c3c7 to f93a270 Compare May 30, 2017 06:08
@wojtek-t
Copy link
Member Author

Applying label based on @smarterclayton comment above - thanks!

@wojtek-t wojtek-t added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 30, 2017
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented May 30, 2017

@wojtek-t: The following test(s) failed:

Test name Commit Details Rerun command
pull-kubernetes-federation-e2e-gce f93a270 link @k8s-bot pull-kubernetes-federation-e2e-gce test this

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.

@wojtek-t
Copy link
Member Author

@k8s-bot pull-kubernetes-e2e-gce-etcd3 test this

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 45327, 46217, 46377, 46428, 46588)

@k8s-github-robot k8s-github-robot merged commit 481e017 into kubernetes:master May 30, 2017
@wojtek-t wojtek-t deleted the matches_single_without_selector branch May 30, 2017 13:30
@smarterclayton
Copy link
Contributor

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.

@wojtek-t
Copy link
Member Author

wojtek-t commented Jun 4, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/scalability Categorizes an issue or PR as relevant to SIG Scalability. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants