cluster-api-provider-aws icon indicating copy to clipboard operation
cluster-api-provider-aws copied to clipboard

Disable MachinePool ASG instance refresh

Open mweibel opened this issue 3 years ago • 8 comments
trafficstars

/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

mweibel avatar Apr 26 '22 11:04 mweibel

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

k8s-triage-robot avatar Jul 25 '22 11:07 k8s-triage-robot

/remove-lifecycle stale

Skarlso avatar Jul 26 '22 07:07 Skarlso

Hello @mweibel.

This is still a desired thing, right?

Skarlso avatar Jul 26 '22 07:07 Skarlso

hi @Skarlso yes :)

mweibel avatar Jul 26 '22 08:07 mweibel

/triage accepted

sedefsavas avatar Aug 16 '22 14:08 sedefsavas

/help

sedefsavas avatar Aug 16 '22 14:08 sedefsavas

@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.

k8s-ci-robot avatar Aug 16 '22 14:08 k8s-ci-robot

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.

harveyxia avatar Aug 16 '22 14:08 harveyxia

/assign harveyxia /lifecycle active

richardcase avatar Oct 14 '22 16:10 richardcase