-
Notifications
You must be signed in to change notification settings - Fork 662
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
List nodes through informer in every iteration #249
List nodes through informer in every iteration #249
Conversation
31de11f
to
2bfddc8
Compare
return | ||
} | ||
|
||
if len(nodes) <= 1 { |
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 number this a good candidate for a configurable option in a future PR? e.g. a user might want to set this to match the number of AZs in their cluster.
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.
Two nodes is a minimal condition for running the descheduler. In case you need to also verify each AZ has at list one node available, what are the chances you will not have it before you run the descheduler. Also, it's maybe more convenient for individual strategies. No strategy should evict a pod if there's no other node where the new pod can land. Including constraining strategies to be zone aware.
Also, refactor the code a bit so it can be tested without checking for eviction support.
2bfddc8
to
9593ce1
Compare
@damemi @aveshagarwal PTAL |
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.
/lgtm
thanks @ingvagabund!
/lgtm thanks @ingvagabund |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aveshagarwal, ingvagabund 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 |
/kind bug |
…ough-informer-in-every-iteration List nodes through informer in every iteration
Also, refactor the code a bit so it can be tested without checking for eviction support.
Fixes: #245