-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Fix: Include restartable init containers in Pod utilization calc #6225
Fix: Include restartable init containers in Pod utilization calc #6225
Conversation
Can you clarify what problem this is solving? |
/assign @towca |
It's bringing CA util calculations in line with the scheduler. Without it, in some weird cases CA could be underestimating how much of a node's resources a pod is taking. E.g. a pod with containers requesting only 1 CPU, but with an initContainer requesting 7 CPU scheduled on an 8-core Node. CA could scale the node down because it'd calculate the utilization as 1/8, when actually the pod is taking 7/8 of the Node. |
3c64cc6
to
fc4f607
Compare
fc4f607
to
2821f4e
Compare
Reuse k/k resourcehelper func
2821f4e
to
54909eb
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: azylinski, towca 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 |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Fix pod resources utilization calculation - Include restartable init containers
Similar logic is already in k/k: https://github.com/kubernetes/kubernetes/blob/8453eb0c24ea61794157b451e4442ea570abce45/pkg/controller/podautoscaler/replica_calculator.go#L424
Does this PR introduce a user-facing change?