- 
                Notifications
    You must be signed in to change notification settings 
- Fork 637
Description
/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