-
Notifications
You must be signed in to change notification settings - Fork 59
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
KUBE-5984 - ensure that scale-ups always occur when there are starved pods #225
KUBE-5984 - ensure that scale-ups always occur when there are starved pods #225
Conversation
If you want this to close the issue, you'll need to use the keywords from here - https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword, e.g. closes/fixes/resolves etc. |
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.
Overall looks really good, just some small nits and clarifications
Would be good to see in the description of this PR what the change does to fix the issue - I had to look through the code to see how it addresses the original issue |
LGTM - thanks for the contribution! |
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.
Looks good. Only that one nit from me, happy to leave decision to you.
This fixes #224
The main change here is to add a
ScaleOnStarve
option to the node group configuration. This true/false value configures an additional check on the nodeDelta calculated during the scaling step.When we gather the RequestedPod, we also gather the largest pending pods (by both CPU and Memory). When we gather the node capacity, we also gather the largest node (node with allocatable CPU/Memory minus used pod CPU/memory) that is the highest. If either of the requested pods have larger requirements than what's available on the largest capacity, then that indicates we have a "starved pod". In the case that a pod exists with no nodes available (and we have
ScaleOnStarve
enabled), then we make sure that the scaling algorithm has at least 1 scale up as the final result.