-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
Removed old scheduler constructor. #45472
Conversation
s := &Scheduler{ | ||
config: c, | ||
} | ||
metrics.Register() |
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.
What is registering metrics now?
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.
New
is replaced by NewFromConfigurator
now. New
is not use in kube-scheduler but tests, I'm updating code for them.
plugin/pkg/scheduler/testutil.go
Outdated
|
||
type FakeConfigurator struct { | ||
Config *Config | ||
PriorityConfigs []algorithm.PriorityConfig |
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.
All of these seems to be unused in all usecases.
Unless you see a good reason to have them (I don't), I really suggest removing all of these fields.
And all accessort functions can simple return nils (which they already do) or errors "not implemented" (if it won't break anything).
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.
Good point, I'll update it.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: k82cn, wojtek-t
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue (batch tested with PRs 41903, 45311, 45474, 45472, 45501) |
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes # N/ARelease note: