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

feat(eks): managed node groups can specify updateConfig #27320

Closed
wants to merge 11 commits into from

Conversation

kishiel
Copy link
Contributor

@kishiel kishiel commented Sep 27, 2023

Adds the updateConfig to managed node groups so that node version upgrades can move faster than the default of 1 instance at a time. The default value resulted in slow deployments (sometimes hours) to occur, which were blocking fixes from getting through my service pipelines. This change will allow us to increase the velocity of changes for our customers.

Design

Not much going on here, the plumbing already existed, I just exposed the updateConfig on the interfaces.

Testing

Created a sample stack which included the change and deployed successfully. I added the updateConfig to the integ.eks-cluster test for both attributes of the updateConfig and both worked.


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

@aws-cdk-automation aws-cdk-automation requested a review from a team September 27, 2023 16:41
@github-actions github-actions bot added p2 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels Sep 27, 2023
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Sep 27, 2023
Copy link
Contributor

@lpizzinidev lpizzinidev left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!
I left you a couple of comments in the code.
Also, unit tests should be added here to verify the validation rules and that the update configuration are generated correcly.

packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-eks/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@lpizzinidev lpizzinidev left a comment

Choose a reason for hiding this comment

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

Thanks for the changes 💪
Some changes are needed in documentation and validation.
Also, I think maxUnavailable should default to undefined since updateConfig is not required.
Changing this should also fix build errors due to failing functional tests.

packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-eks/README.md Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@lpizzinidev lpizzinidev left a comment

Choose a reason for hiding this comment

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

Looks great!
Last minor adjustments and it will be good to go for me.
Thank you for providing documentation for the maxSize constraint and suggesting the correct default values.

packages/aws-cdk-lib/aws-eks/README.md Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts Outdated Show resolved Hide resolved
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 7f918a0
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Oct 4, 2023
Copy link
Contributor

@lpizzinidev lpizzinidev left a comment

Choose a reason for hiding this comment

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

Thanks 👍

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Oct 4, 2023
@vinayak-kukreja
Copy link
Contributor

Hey @kishiel, thank you for opening this PR and apologies for the delay.

I see you have opened this PR from main branch on your fork kishiel:main. We would not be able to accept a contribution directly to main. Could you please follow the guidelines here and reopen this PR.

@kishiel
Copy link
Contributor Author

kishiel commented Oct 17, 2023

I've created a new branch with these changes, but I don't see a way to edit this PR. When you say reopen do you mean open a new one?

@lpizzinidev
Copy link
Contributor

lpizzinidev commented Oct 18, 2023

@kishiel
Yes, you should close this PR and open a new one with the changes from the separate branch. Thanks 💪

@kishiel
Copy link
Contributor Author

kishiel commented Oct 18, 2023

New PR: #27593

@kishiel kishiel closed this Oct 18, 2023
@mergify
Copy link
Contributor

mergify bot commented Oct 18, 2023

⚠️ The sha of the head commit of this PR conflicts with #27593. Mergify cannot evaluate rules on this PR. ⚠️

mergify bot pushed a commit that referenced this pull request Oct 31, 2023
…27593)

This is a duplicate of [PR 27320](#27320) but on a new branch in my repo.

This change enables nodegroups to configure updateConfig properties which will allow nodegroups to upgrade more than 1 instance at a time.  The default value of 1 results in slow deployment times which prevented my service pipelines from quickly delivering fixes to my customers.  This change allows each nodegroup to specify a maximum count of instances, or percent, which can be upgraded in parallel.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 pr/needs-maintainer-review This PR needs a review from a Core Team Member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants