Refactoring AutoscalerBuilder and Extracting NodeInfoComparator#9398
Refactoring AutoscalerBuilder and Extracting NodeInfoComparator#9398GaetanoMar96 wants to merge 2 commits intokubernetes:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: GaetanoMar96 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 @GaetanoMar96. 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. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This PR consolidates multiple architectural cleanups to make the AutoscalerBuilder more modular, testable with synctest, and provider-agnostic regarding node comparisons.
Key Changes:
Moved NewAutoscaler from core/autoscaler.go to builder/autoscaler.go and created autoscaler_factory.go.
This breaks circular dependencies and makes the
AutoscalerBuilder more self-contained.
Moved TemplateNodeInfoProvider and NodeInfoComparator setup logic from the multi-provider hub into individual cloud provider builders (e.g., aws.BuildAWS, gce.BuildGCE, azure.BuildAzure).
Added generic override in NewCloudProvider for BalancingLabels when present to ensure user flags take precedence over provider defaults.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: