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

fix(eks): default capacity uses desiredCapacity which is an anti-pattern #5651

Merged
merged 5 commits into from
Jan 6, 2020

Conversation

eladb
Copy link
Contributor

@eladb eladb commented Jan 5, 2020

As described in #5215, desiredCapacity is not the recommended way to configure an auto scaling group since it will cause the ASG to reset the number of nodes in every CloudFormation deployment. Since EKS's default capacity uses desiredCapacity instead of minCapacity, as of #5507 this would emit a warning: "desiredCapacity has been configured. Be aware this will reset the size of your AutoScalingGroup on every deployment".

This change modifies the behavior of the default capacity such that it will configure the ASG using minCapacity instead of desiredCapacity as recommended by ASG.

Fixes #5650


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

As described in #5215, `desiredCapacity` is not the recommended way to configure an auto scaling group since it will cause the ASG to reset the number of nodes in every CloudFormation deployment. Since EKS's default capacity uses `desiredCapacity` instead of `minCapacity`, as of #5507 this would emit a warning: "desiredCapacity has been configured. Be aware this will reset the size of your AutoScalingGroup on every deployment".

This change modifies the behavior of the default capacity such that it will configure the ASG using `minCapacity` instead of `desiredCapacity` as recommended by ASG.

Fixes #5650
@eladb eladb requested a review from rix0rrr January 5, 2020 16:52
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 5, 2020
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

@rix0rrr rix0rrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you just take a minCapacity and maxCapacity on the EKS cluster (with some reasonable defaults)? Or is this cluster not intended to autoscale?

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@eladb
Copy link
Contributor Author

eladb commented Jan 6, 2020

@rix0rrr wrote:

Or is this cluster not intended to autoscale?

No, this cluster doesn't have auto scaling enabled, so I think this is fine.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Jan 6, 2020

Thank you for contributing! Your pull request is now being automatically merged.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Jan 6, 2020

Thank you for contributing! Your pull request is now being automatically merged.

@mergify mergify bot merged commit a883fed into master Jan 6, 2020
@mergify mergify bot deleted the benisrae/eks-use-min-capacity branch January 6, 2020 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EKS: default capacity uses "desiredCapacity" instead of "minCapacity"
3 participants