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

Correctly support desiredSize and minSize of 0 for ManagedNodeGroup #645

Closed
drunkirishcoder opened this issue Dec 16, 2021 · 3 comments
Closed
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Milestone

Comments

@drunkirishcoder
Copy link
Contributor

Hello!

  • Vote on this issue by adding a 👍 reaction
  • To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already)

Issue details

desiredSize and minSize of 0 are not correctly handled when specifying the NodeGroupScalingConfigArgs for a ManagedNodeGroup.

Steps to reproduce

  1. Set either desiredSize or minSize to 0.
  2. pulumi up
  3. Check EKS management console and see desiredSize is 2 and minSize is 1

Expected:

desiredSize = 0
minSize = 0

Actual:

desiredSize = 2
minSize = 1

the offending code appears to be https://github.com/pulumi/pulumi-eks/blob/master/nodejs/eks/nodegroup.ts#L907-L908

const desiredSize = config && config.desiredSize || 2;
const minSize = config && config.minSize || 1;

because 0 is falsy, the expression 0 || 2 evaluates to 2 not 0.

@drunkirishcoder drunkirishcoder added the kind/bug Some behavior is incorrect or out of spec label Dec 16, 2021
@leezen
Copy link
Contributor

leezen commented Dec 18, 2021

Thanks for pointing out the bugs -- any chance you'd be willing to submit a PR for this?

@drunkirishcoder
Copy link
Contributor Author

submitted.

@stack72 stack72 self-assigned this May 9, 2022
@stack72 stack72 added the resolution/fixed This issue was fixed label May 9, 2022
@stack72 stack72 added this to the 0.72 milestone May 9, 2022
@stack72
Copy link
Contributor

stack72 commented May 9, 2022

Closed via #654

@stack72 stack72 closed this as completed May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

3 participants