feat: add secondary IPv6 support for pod ENI feature#3583
Open
jfernandez wants to merge 1 commit intoaws:masterfrom
Open
feat: add secondary IPv6 support for pod ENI feature#3583jfernandez wants to merge 1 commit intoaws:masterfrom
jfernandez wants to merge 1 commit intoaws:masterfrom
Conversation
The pod ENI feature (security groups for pods) only supported single IP family configurations. Pods in IPv4 clusters received only an IPv4 address, preventing them from communicating over IPv6 even when the underlying infrastructure supported dual-stack networking. Add support for assigning a secondary IPv6 address to pods using pod ENIs in IPv4 clusters. The IPv6Address field in VirtualInterfaceMetadata carries the secondary address, while IPAddress continues to hold the primary IPv4 address. When both are present, the CNI plugin configures the pod's network namespace with both addresses, enables IPv6 forwarding on the host veth interface, and sets up routing for both IP families through the VLAN interface to the pod ENI. This implementation is limited to IPv4 clusters with secondary IPv6. Support for IPv6 clusters with secondary IPv4 is explicitly blocked in this change to reduce scope, though the ENABLE_POD_ENI_DUAL_STACK feature flag is named generically to allow for that support in the future. The ipamd validates the cluster IP family at startup and fails to start if dual-stack is enabled on an IPv6 cluster. Link: aws#3582 Link: aws/amazon-vpc-resource-controller-k8s#638 Signed-off-by: Jose Fernandez <josef@netflix.com>
75202dd to
3065284
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
feature
Which issue does this PR fix?:
Addresses Phase 1 for: #3582
What does this PR do / Why do we need it?:
The pod ENI feature (security groups for pods) only supported single IP family configurations. Pods in IPv4 clusters received only an IPv4 address, preventing them from communicating over IPv6 even when the underlying infrastructure supported dual-stack networking.
Add support for assigning a secondary IPv6 address to pods using pod ENIs in IPv4 clusters. The IPv6Address field in VirtualInterfaceMetadata carries the secondary address, while IPAddress continues to hold the primary IPv4 address. When both are present, the CNI plugin configures the pod's network namespace with both addresses, enables IPv6 forwarding on the host veth interface, and sets up routing for both IP families through the VLAN interface to the pod ENI.
This implementation is limited to IPv4 clusters with secondary IPv6. Support for IPv6 clusters with secondary IPv4 is explicitly blocked in this change to reduce scope, though the ENABLE_POD_ENI_DUAL_STACK feature flag is named generically to allow for that support in the future. The ipamd validates the cluster IP family at startup and fails to start if dual-stack is enabled on an IPv6 cluster.
Testing done on this change:
Tested and verified on a 1.33 IPv4 EKS cluster.
Will this PR introduce any new dependencies?:
No
Will this break upgrades or downgrades? Has updating a running cluster been tested?:
No update break. Tested on a running cluster.
Does this change require updates to the CNI daemonset config files to work?:
Yes. Requires
ENABLE_POD_ENI_DUAL_STACKto be set on the CNI daemonset.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.