Skip to content

AWSMachinePool does not work in combination with cluster-autoscaler #2022

@dthorsen

Description

@dthorsen

/kind bug

What steps did you take and what happened:

  • Create a workload cluster with the experimental EKS Control Plane
  • Create a MachinePool without specifying replicas and create associated AWSMachinePool resources.
  • Install cluster-autoscaler and configure it to autoscale the autoscaling group managed by the AWSMachinePool
  • Create a deployment that will trigger cluster-autoscaler to scale up the autoscaling group.

This caused the AWSMachinePool controller and the cluster-autoscaler to both attempt to manage DesiredInstances. The result being the DesiredInstances value on the ASG was alternating between the value cluster-autoscaler computed as needed and the value of replicas: 1 coming from the defaulted value on the MachinePool object.

What did you expect to happen:
cluster-autoscaler should manage the DesiredInstances of the autoscaling group and the AWSMachinePool controller should ignore changes to the replicas and DesiredInstances fields.

Anything else you would like to add:
Even though replicas is an optional field on the MachinePool resource, it defaults to 1, so leaving the value unspecified is insufficient to prevent the AWSMachinePool controller from attempting to managed the DesiredInstance count.

Environment:

  • Cluster-api-provider-aws version: Commit: 3338cd4
  • Kubernetes version: (use kubectl version): v.1.17.9
  • OS (e.g. from /etc/os-release): Amazon Linux 2

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions