feat(eks-v2-alpha): add support for EKS hybrid nodes#36749
Conversation
|
|
||||||||||||||
|
|
||||||||||||||
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
| /** | ||
| * Remote network configuration for hybrid nodes | ||
| */ | ||
| export interface RemoteNodeNetwork { |
There was a problem hiding this comment.
Why do we need this interface? CDK guidelines recommend flattening over nested structures and this is just an array of strings. Shouldne we just use that directly?
This applies also to RemotePodNetwork
There was a problem hiding this comment.
The CFN type accepts a list of remote networks, where each network is a CIDR array so the interface is {cidrs: string[]}[] which is RemoteNodeNetwork[] so flattening to remoteNodeNetworkCidrs: string[] is not equivalent, as you can have multiple networks each with their own CIDR arrays.
Right now EKS/CFN has a limit of 1 network, so we can flatten to remoteNodeNetworkCidrs but if they increase this limit to allow more then one we would need to add a new prop and deprecate this one.
There was a problem hiding this comment.
Ah, missed that cfn expects the same shape. I guess is ok to keep it like this then
|
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). |
Merge Queue Status🚫 The pull request has left the queue (rule: This pull request spent 14 hours 26 minutes 9 seconds in the queue, with no time running CI. Required conditions to merge
ReasonPull request #36749 has been merged manually at 48ace56 HintYou were too fast! |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Reason for this change
This change allows users to specify the networking primitives for an EKS Hybrid nodes cluster through L2 constructs.
Description of changes
This PR introduces two new top-level fields called remoteNodeNetworks and remotePodNetworks in the Cluster construct. Together, these allow users to specify the exact CIDRs ranges they want to use for their on-premises nodes and (optionally) pods. The Hybrid nodes feature requires that none of the node and pod CIDRs overlap with each other so I have also added validations for that.
Network utils from EC2 had to be exported so they can be used in eks-v2-alpha, which is in a different package (@aws-cdk/aws-eks-v2-alpha). It cannot be used directly without an export like in eks v1 which is in aws-cdk-lib. Because of that, they are marked as internal.
Similar to #32389
This aligns EKS v2 with v1. I also confirmed it works with EKS auto mode.
Describe any new or updated permissions being added
None
Description of how you validated changes
Integ test deployed
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license