cluster-api-provider-aws
cluster-api-provider-aws copied to clipboard
Disable MachinePool ASG instance refresh
/kind feature
Describe the solution you'd like I'd like the ability to disable automatic instance refresh on a machinepool. Currently when one e.g. changes the AMI of a AWSMachinePool, an instance refresh is automatically started: https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/exp/controllers/awsmachinepool_controller.go#L480
Anything else you would like to add: We have long running jobs on windows machines (boot up time takes a while and is expensive due to windows licensing). Ideally updating an AMI would not automatically refresh the instances but instead new instances come up with the new AMI while old instances are left as-is. In our use case they get shutdown after the job anyway, so with time a refresh is done without interrupting workloads.
I'd be happy to collaborate on a PR for this. I'm not 100% which approach to take - there are RefreshPreferences with a Strategy (which currently only allows Rolling):
https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/e53fce703aaa8ffce6913cb96d24f1f37e355ef2/exp/api/v1beta1/awsmachinepool_types.go#L97
I could extend this to e.g. allow Disable as the Strategy, but then it wouldn't map 1:1 to the ASG refresh properties so I'm not sure if this is the best approach.
Environment:
- Cluster-api-provider-aws version: 1.4.1
- Kubernetes version: (use
kubectl version): 1.23 - OS (e.g. from
/etc/os-release): windows/linux hybrid
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale - Mark this issue or PR as rotten with
/lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
Hello @mweibel.
This is still a desired thing, right?
hi @Skarlso yes :)
/triage accepted
/help
@sedefsavas: This request has been marked as needing help from a contributor.
Guidelines
Please ensure that the issue body includes answers to the following questions:
- Why are we solving this issue?
- To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
- Does this issue have zero to low barrier of entry?
- How can the assignee reach out to you for help?
For more details on the requirements of such an issue, please see here and ensure that they are met.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.
In response to this:
/help
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/test-infra repository.
I am also interested in this feature—we want to use our own tooling for managing instance rotation for existing ASGs, and Cluster API for managing the lifecycle of the ASG itself.
/assign harveyxia /lifecycle active