-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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): in place updates for EKS security group and Subnets #30114
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
Hey, this PR makes sense to me. Thanks for your ownership. I guess we probably need to add some unit tests at |
@pahud yes, I am checking the same |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. I have a question regarding this change. I notice that you removed replaceVpc
and replace it updateVpc
when subnet id and security group id changes. This looks valid to me.
However, I'm curious would there be a case where the actual VPC is replaced and we still want to keep replaceVpc
in this case?
|
||
const app = new App(); | ||
|
||
const stack = new EksClusterStack(app, 'aws-cdk-eks-cluster-stack'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this test test subnet updates? It only get deployed once right? Want to make sure you've tested the flow manually for update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes the flow was manually tested, and then changed to this integ test here.
@GavinZZ EKS does not support updating the subnets (to a different VPC) post its creation at the moment. In CFN, if we specify subnets from a different VPC it does not trigger a replacement type update for the resource rather the error So to match the CFN behavior to not replace the cluster, we can let go of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation! LGTM
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Issue # (if applicable)
Closes #28584
Reason for this change
To have in place updates for EKS clusters when subnets or SG values are changed.
Description of changes
Removed
replaceVpc
logic and introducedupdateVpc
to track changes and errors to handle multiple updates in one goDescription of how you validated changes
Have tested the changes by first deploying a cluster with below config:
TestCase - 1 Update both subnets and Access at the same time
Error below is thrown for Cluster custom resource -
TestCase - 2 Update subnets to public
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license