-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Refactor cloud provider creation options #8583
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
base: master
Are you sure you want to change the base?
Conversation
this is an alternate solution instead of #8531 |
f60b7f0
to
1afa484
Compare
/test pull-cluster-autoscaler-e2e-azure-master |
the circular import in the unit tests is giving me some problems, not quite sure where it's starting. |
i am not able to reproduce the unit test failure with the circular import locally. not sure the best course of action. /retest |
/retest-required |
/retest |
not sure why the tests aren't triggering. |
This change helps to prevent circular dependencies between the core and builder packages as we start to pass the AutoscalerOptions to the cloud provider builder functions.
this changes the options input to the cloud provider builder function so that the full autoscaler options are passed. This is being proposed so that cloud providers will have new options for injecting behavior into the core parts of the autoscaler.
this change adds a method to the AutoscalerOptions struct to allow registering a scale down node processor.
This change adds a custom scale down node processor for cluster api to reject nodes that are undergoing upgrade.
1afa484
to
a5f07fe
Compare
rebased on master |
i'm not sure how i've broken this, but these error lines are not making sense to me:
|
@towca does this error looks familiar to you at all? |
this change removes the import from the gce module in favor of using the string value directly.
ok, think my last commit on this chain fixed the circular import. |
We have a conversation going on here that will potentially improve the gpu node label concern that this PR encountered: /lgtm for @towca to give his thumbs up |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: elmiko, jackfrancis 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 |
i'm fine to change the label in the test for this PR, i was just trying to stop the circular import error. |
PR needs rebase. Instructions 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
/kind api-change
What this PR does / why we need it:
This patch series changes an argument to the
NewCloudProvider
function to use anAutoscalerOptions
struct instead ofAutoscalingOptions
. This change allows cloud providers to have more control over the core functionality of the cluster autoscaler.In specific, this patch series also adds a method named
RegisterScaleDownNodeProcessor
to theAutoscalerOptions
so that cloud providers can inject a custom scale down processor.Lastly, this change adds a custom scale down processor to the clusterapi provider to help it avoid removing the wrong instance during scale down operations that occur during a cluster upgrade.
Which issue(s) this PR fixes:
Fixes #8494
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: