-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add support for creating IPv6 VPC and cluster #4317
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
Add support for creating IPv6 VPC and cluster #4317
Conversation
e660058 to
31e61b4
Compare
11b756e to
2dc5c45
Compare
Skarlso
left a comment
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.
First run of the PR with initial comments and suggestions.
Well done you two, this is excellent work. :)
28e08a1 to
f67da11
Compare
f67da11 to
3b48a63
Compare
| @@ -1,655 +1,69 @@ | |||
| package builder | |||
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.
This file has almost all code moved to vpc_ipv4.go and that's shown as a lot of additions and deletions by Git. This pollutes the Git history and can be misleading when tracking down the changes later. Can we do a git mv pkg/cfn/builder/vpc.go pkg/cfn/builder/vpc_ipv4.go first, make modifications, and then create a new file vpc.go with the changes common to IPv4 and IPv6? It'll also make the changelist small and the PR easier to review.
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.
I just ticked [x] Viewed while viewing the diff, and that help me a lot to reduce the clutter change set.
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.
good idea to use git mv to preserve the git history, will do that! :)
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.
@cPu1 how would you suggest doing this retroactively? I'm not sure how to do this with a rebase 🤔
Skarlso
left a comment
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.
Some minor comments still, but otherwise I THINK THIS IS OKAY!!! :) 🥳 🎈 🎉
9cdc9b4 to
b7a3cc9
Compare
b7a3cc9 to
49cab79
Compare
Himangini
left a comment
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.
LGTM. Remember to Squash and Merge when you merge this PR.
|
@Himangini if we squash and merge we might lose some of the useful context from the commits and their messages, especially since it's such a large PR! maybe we could clean up the git history and squash some commits but not all of them? wdyt? :) |
Isn't this PR enough for context? it'll be cleaner to have single commits in the feature branch 🤷🏻♀️ easier to revert too |
I think this is the single biggest thing that will go into the branch though, its worth having this extra historical commit history. This PR will also be behind two-PRs, since we will then merge the
The PR has a revert button for after its merged encase we had to revert it. This PR also contains a commit that would ideally be reverted in the future as well, which is another reason to keep it c489d36 |
You can't guarantee this is the single biggest thing that will go into the branch. I know the PR has a revert button, I was mentioning this in the context of a feature branch.
Useful info, it wasn't obvious to me, maybe I've missed it in the description. I guess it's fine to merge them as it is. |
2145b47 to
3f3e8a6
Compare
- Add integration test for ipv6 - Renamed VPC files to IPv4 file, and added IPv6 VPC files. - Created new resource set for IPv6 - Added all of the resources to create IPv6 VPC to CF template - Resources being created: VPC, IPv4 CIDR, IPv6 CIDR, EOIGW, NAT GW, IGW, route tables, routes, private and public subnets, route table associations - Added outputs to CF template for VPC and public/private subnets - Added integration and unit tests Co-authored-by: Jake Klein <aclevername@users.noreply.github.com> Refactoring VPC template creation - Making addResources and addOutputs private - Creating new CreateTemplate function for both IPv4 and IPv6
* Adding integration test set AssignIpv6AddressOnCreation to true for public subnets after the rest of the template.
- Revert me!
… CF bug - AssignIpv6AddressOnCreation also needs to be set on public subnets, but due to a current bug in CF, this cannot be set alongside MapPublicIpOnLaunch at create time. This means we need to add it "manually" by hitting the VPC API to update each public subnet after launch. - Added extra validation that NAT is nil
This reverts commit dc2c50a.
- Also pass unit tests and remove commented code
Update integration/tests/ipv6/ipv6_test.go Co-authored-by: Chetan Patwal <cPu1@users.noreply.github.com> set example ipv6 region to us-west-2
3f3e8a6 to
3237ad2
Compare
|
I squashed some commits so that we have 5 fewer of them while still maintaining some extra history/context and the commits that need to be reverted in the future - hope this works for everyone |
Description
Closes #4260
This PR introduces the option to create a cluster with an IPv6 enabled VPC.
When
VPC.IPFamilyis set toIPv6we create a VPC with IPv6 enabled. To checkout all the resource we create, seepkg/cfn/builder/vpc_ipv6.go. These are: VPC, IPv4 CIDR, IPv6 CIDR, EOIGW, NAT GW, IGW, route tables, routes, private and public subnets, and route table associations.CreateAddonTaskswaits for addons to be healthy only if there are nodegroups. (already merged to main #4332)AssignIpv6AddressOnCreationis set to true on public subnets as a post-creation task due to a CF bug.Checklist
README.md, or theuserdocsdirectory)area/nodegroup) and kind (e.g.kind/improvement)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯