fix: calculate resource diff for priority as max across containers#9363
fix: calculate resource diff for priority as max across containers#9363rudrakhp wants to merge 1 commit intokubernetes:masterfrom
Conversation
|
Welcome @rudrakhp! |
|
Hi @rudrakhp. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rudrakhp The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Signed-off-by: Rudrakh Panigrahi <[email protected]>
ac16f93 to
a6effd0
Compare
What type of PR is this?
/kind bug
What this PR does / why we need it:
ResourceDiff is calculated by summing all container requests per resource type and then calculating the percentage difference of these totals. This might lead to cases where even though per container diff might be high it doesn't reflect accurately in pod resource diff. In this change we take a max diff across all container-resource pairs so thresholds allow for these pods to be evicted.
Which issue(s) this PR fixes:
Fixes #8903
Special notes for your reviewer:
Does this behavior change need to be highlighted in case users are setting thresholds very low to compensate for current behavior that averages out diffs across containers? They might see more frequent evictions with this fix.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: