Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EKS ASG Worker Desired Capacity Change being ignored #162

Closed
1 task done
datadarius opened this issue Oct 12, 2018 · 7 comments
Closed
1 task done

EKS ASG Worker Desired Capacity Change being ignored #162

datadarius opened this issue Oct 12, 2018 · 7 comments

Comments

@datadarius
Copy link

I have issues

For an existing Cluster that has been deployed using version 1.6 I would like to modify the worker counts.

I'm submitting a...

  • support request

What is the current behavior?

When editing asg_desired_capacity it does not affect terraform plan and the ASG is not modified.

module "eks_dev" {
  source  = "terraform-aws-modules/eks/aws"
  version = "1.6.0"
...
  workers_group_defaults = {
   key_name = "exploration-zone"
   asg_desired_capacity          = "4"                             # Desired worker capacity in the autoscaling group.
   asg_max_size                  = "5"                             # Maximum worker capacity in the autoscaling group.
   asg_min_size                  = "2"                             # Minimum worker capacity in the autoscaling group.
   instance_type = "m4.large" # Size of the workers instances.
...

If this is a bug, how to reproduce? Please include a code sample if relevvant.

  • Deploy an EKS Cluster with custom worke_group_defaults
  • After succesfull deployment, try to modify the asg_desired_capacity

What's the expected behavior?

  • The asg parameter change should be reflected in terraform plan and applicable.

Are you able to fix this problem and submit a PR? Link here if you have already.

sry, no.

Environment details

AWS region us-east-1

  • Affected module version:
  • OS: Terraform executed in both ubuntu 16.04 as well as hashicorp/terraform:light
  • Terraform version: 0.11.8

Any other relevant info

Also testes with 1.7 release. No impact.
.terraform was also removed and terraform init performed.

@max-rocket-internet
Copy link
Contributor

This is because desired_capacity is ignored due not wanting it to interfere with the cluster-autoscaler: https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/workers.tf#L22

So currently you would need to set this manually outside of Terraform.

Feel free to make a PR to make this setting optional 🙂

@datadarius
Copy link
Author

Thank you for the quick and helpful response. I think the auto-scaler aspect is a fair point. I am fine if this is working as intended for the time being and will make use of the autoscaler once the environment has been bootstrapped.

@max-rocket-internet
Copy link
Contributor

OK cool, thanks for the update.

@larslevie
Copy link

Would it make sense to exclude desired_capacity from the ignore lifecycle hook unless autoscaling_enabled is true for a given worker group?

@max-rocket-internet
Copy link
Contributor

Sure

@dpiddockcmp
Copy link
Contributor

lifecycle block does not support interpolations hashicorp/terraform#3116

@github-actions
Copy link

github-actions bot commented Dec 3, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants