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

Priorities use SharedLister interface instead of NodeInfo Map #84449

Merged
merged 1 commit into from Oct 30, 2019

Conversation

ahg-g
Copy link
Member

@ahg-g ahg-g commented Oct 28, 2019

What type of PR is this?

/kind feature

What this PR does / why we need it:
Updates Priorities, including PriorityMetadataProducer and related plugins to use SharedLister instead of NodeInfo Map. This is part of cleaning up the dependency of plugins on framework.NodeInfoSnapshot and replace it with SharedLister.

Which issue(s) this PR fixes:
Fixes #84448

NONE

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 28, 2019
@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 28, 2019
@ahg-g ahg-g force-pushed the ahg-prioritymeta branch 2 times, most recently from 08ba856 to 29120e6 Compare October 28, 2019 15:54
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g

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

@k8s-ci-robot k8s-ci-robot added area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Oct 28, 2019
@ahg-g ahg-g changed the title [WIP] Priorities use SharedLister interface instead of NodeInfo Map Priorities use SharedLister interface instead of NodeInfo Map Oct 28, 2019
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 28, 2019
@ahg-g
Copy link
Member Author

ahg-g commented Oct 28, 2019

This is ready, but depends on #84389

Copy link
Member

@Huang-Wei Huang-Wei left a comment

Choose a reason for hiding this comment

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

LGTM. Just a nit.

@@ -704,7 +704,7 @@ func (g *genericScheduler) podFitsOnNode(
func PrioritizeNodes(
ctx context.Context,
pod *v1.Pod,
nodeNameToInfo map[string]*schedulernodeinfo.NodeInfo,
snapshot *nodeinfosnapshot.Snapshot,
Copy link
Member

Choose a reason for hiding this comment

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

We can make the parameter as sharedLister schedulerlisters.SharedLister.

Copy link
Member Author

Choose a reason for hiding this comment

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

genericScheduler is aware of Snapshot, it is actually the one that updates it, so I think it is a little confusing to use Snapshot in some part of the code here and SharedLister in others. I think a potential useful refactoring is to make PrioritizeNodes a member function of genericScheduler, I can do that in a followup PR.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 29, 2019
@ahg-g
Copy link
Member Author

ahg-g commented Oct 29, 2019

This is ready, but depends on #84389

Rebased.

@ahg-g
Copy link
Member Author

ahg-g commented Oct 29, 2019

/retest

@Huang-Wei
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 29, 2019
@Huang-Wei
Copy link
Member

/retest

@k8s-ci-robot k8s-ci-robot merged commit a8727f0 into kubernetes:master Oct 30, 2019
@k8s-ci-robot k8s-ci-robot added this to the v1.17 milestone Oct 30, 2019
@ahg-g ahg-g deleted the ahg-prioritymeta branch January 10, 2020 15:38
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. area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/testing Categorizes an issue or PR as relevant to SIG Testing. 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.

Remove NodeInfoSnapshot from framework interface
3 participants