From 0d49f8265af2bdbd1ace6c23cfab79d37ef7bc94 Mon Sep 17 00:00:00 2001 From: irti Date: Thu, 19 Sep 2019 00:13:20 +0500 Subject: [PATCH 1/3] [add-notes] update local.tf file --- local.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local.tf b/local.tf index e5a9c33..f818175 100644 --- a/local.tf +++ b/local.tf @@ -23,9 +23,9 @@ locals { name = "count.index" # Name of the worker group. Literal count.index will never be used but if name is not set, the count.index interpolation will be used. tags = [] # A list of map defining extra tags to be applied to the worker group ASG. ami_id = data.aws_ami.eks_worker.id # AMI ID for the eks workers. If none is provided, Terraform will search for the latest version of their EKS optimized worker AMI. - asg_desired_capacity = "1" # Desired worker capacity in the autoscaling group. + asg_desired_capacity = "1" # Desired worker capacity in the autoscaling group and changing its value will not affect the autoscaling group's desired capacity because the cluster-autoscaler manages up and down scaling of the nodes. Cluster-autoscaler add nodes when pods are in pending state and remove the nodes when they are not required by modifying the desirec_capacity of the autoscaling group. Although an issue exists in which if the value of the asg_min_size is changed it modifies the value of asg_desired_capacity. asg_max_size = "3" # Maximum worker capacity in the autoscaling group. - asg_min_size = "1" # Minimum worker capacity in the autoscaling group. + asg_min_size = "1" # Minimum worker capacity in the autoscaling group. NOTE: Change in this paramater will affect the asg_desirec_capacity, like changing its value to 2 will change asg_desired_capacity value to 2 but bringing back it to 1 will not affect the asg_desired_capacity. asg_force_delete = false # Enable forced deletion for the autoscaling group. asg_initial_lifecycle_hooks = [] # Initital lifecycle hook for the autoscaling group. asg_recreate_on_change = false # Recreate the autoscaling group when LT or LC change. From 0fd70461203b96017569e3ee159cf5f98a21b993 Mon Sep 17 00:00:00 2001 From: Irtiza Ali Date: Thu, 19 Sep 2019 17:33:09 +0500 Subject: [PATCH 2/3] update local.tf by fixing typo --- local.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local.tf b/local.tf index f818175..a8c3e62 100644 --- a/local.tf +++ b/local.tf @@ -25,7 +25,7 @@ locals { ami_id = data.aws_ami.eks_worker.id # AMI ID for the eks workers. If none is provided, Terraform will search for the latest version of their EKS optimized worker AMI. asg_desired_capacity = "1" # Desired worker capacity in the autoscaling group and changing its value will not affect the autoscaling group's desired capacity because the cluster-autoscaler manages up and down scaling of the nodes. Cluster-autoscaler add nodes when pods are in pending state and remove the nodes when they are not required by modifying the desirec_capacity of the autoscaling group. Although an issue exists in which if the value of the asg_min_size is changed it modifies the value of asg_desired_capacity. asg_max_size = "3" # Maximum worker capacity in the autoscaling group. - asg_min_size = "1" # Minimum worker capacity in the autoscaling group. NOTE: Change in this paramater will affect the asg_desirec_capacity, like changing its value to 2 will change asg_desired_capacity value to 2 but bringing back it to 1 will not affect the asg_desired_capacity. + asg_min_size = "1" # Minimum worker capacity in the autoscaling group. NOTE: Change in this paramater will affect the asg_desired_capacity, like changing its value to 2 will change asg_desired_capacity value to 2 but bringing back it to 1 will not affect the asg_desired_capacity. asg_force_delete = false # Enable forced deletion for the autoscaling group. asg_initial_lifecycle_hooks = [] # Initital lifecycle hook for the autoscaling group. asg_recreate_on_change = false # Recreate the autoscaling group when LT or LC change. From 185cd4499eb802e8e807c3c6bc3e065c4edceffa Mon Sep 17 00:00:00 2001 From: irti Date: Sat, 21 Sep 2019 00:12:21 +0500 Subject: [PATCH 3/3] [add-notes] update the docs/autoscaling.md document --- docs/autoscaling.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/autoscaling.md b/docs/autoscaling.md index 35ecc31..c4b6d98 100644 --- a/docs/autoscaling.md +++ b/docs/autoscaling.md @@ -28,6 +28,10 @@ To install the chart, simply run helm with the `--values` option: helm install stable/cluster-autoscaler --values=path/to/your/values-file.yaml ``` +`NOTE` + +There is a variable `asg_desired_capacity` given in the `local.tf` file, currently it can be used to change the desired worker(s) capacity in the autoscaling group but currently it is being ignored in terraform to reduce the [complexities](https://github.com/terraform-aws-modules/terraform-aws-eks/issues/510#issuecomment-531700442) and the feature of scaling up and down the cluster nodes is being handled by the cluster autoscaler. + ## See More [Using AutoScalingGroup MixedInstancesPolicy](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/aws/README.md#using-autoscalinggroup-mixedinstancespolicy) \ No newline at end of file