Don't call SchedulablePodGroups when only 1 node group gets created#9669
Don't call SchedulablePodGroups when only 1 node group gets created#9669morshielt wants to merge 3 commits into
Conversation
Refactor only, no meaningful changes, just moving the code and updating variable -> struct param names.
As there won't be balancing done anyway, so there's no need to. Also fixes potential stale/duplicate podEquivalenceGroups.SchedulableGroups entries (i.e. reporting improvement).
|
This issue is currently awaiting triage. If SIG Autoscaling contributors determines this is a relevant issue, they will accept it by applying the The 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: morshielt 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 |
|
Hi @morshielt. 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 Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain 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. |
|
/assign x13n |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This PR introduces an optimization to scale-up process by skipping the expensive
SchedulablePodGroupssimulation when only 1 node group is created, as the result is only used bybalanceScaleUps(which doesn't matter when we get 1 node group created).Instead of the expensive call, we're now only patching the node group ID directly (also fixed the stale/duplicate
podEquivalenceGroups.SchedulableGroupsentries) for reporting correctness.To keep the
schedulablePodGroups(which now won't be recalculated in 1 node group cases) in a more contained scope and prevent future uses depending on the now skipped calculations, the PR includes a refactor that extracted the scale-up planning logic into a separateplanScaleUpmethod.Which issue(s) this PR fixes:
n/a
Special notes for your reviewer:
Commits are split into logical parts, 1st only moving the code without meaningful changes. PTAL
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: