Skip to content

Conversation

shethyogita83
Copy link
Contributor

Issue

Until now, UDP on NLB was supported only over IPv4 address type NLBs because the NLB preserves the client-IP for IPv4 address type NLBs.
Dualstack NLBs and PrivateLink NLBs are required to do sourceNAT and thus cannot support UDP because in cases where NLB doesn’t preserve client-IP but translates (sourceNAT) it to its own IP, there is a risk of packets being mis-routed between clients.
But now we want to support UPD over IPv6 address type NLBs too since this feature allow customers (service owners) to provide UDP-based services such as media streaming, gaming, remote desktop applications, VoIP, etc., over IPv6 too.

Description

To support UDP for NLB over IPv6 on K8 controller Service, We introduced two new optional annotations on K8 Service annotations, for the corresponding API input Parameters on CreateLoadBalancer API and SetSubnets API
Optional Annotation 1 - service.beta.kubernetes.io/aws-load-balancer-enable-prefix-for-ipv6-source-nat: Values can be either “on” or “off”. Default value is off. Corresponding API Input property is EnablePrefixForIpv6SourceNat in CreateLoadBalancer API and SetSubnets API
Optional Annotation 2 - service.beta.kubernetes.io/aws-load-balancer-source-nat-ipv6-prefixes : Value is a list of ipv6Prefixes or if user doesn’t want to provide particular ipv6Prefixe value, user can use “auto-assigned”.
ipv6Prefixes list should have same length as the number of subnets. Each Ipv6 prefix in the list will be applied to each corresponding subnet in the subnets annotation list in the same order. A valid ipv6 prefix ends with /80 and it should be within the CIDR range of the corresponding subnet (e.g. 2600:1f16:ed6:312:98c3::/80). Corresponding API Input property is SourceNatIpv6Prefixes in CreateLoadBalancer API and SetSubnets API
This PR is very similar to the old PR https://github.com/shethyogita83/private-aws-load-balancer-controller/pull/1, but with required modifications to suit the aws-sdk-go version update.

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the docs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯

  • Backfilled missing tests for code in same general area 🎉
  • Refactored something and made the world a better place 🌟

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 31, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @shethyogita83. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 31, 2024
@shraddhabang shraddhabang self-requested a review October 31, 2024 19:09
@shraddhabang
Copy link
Collaborator

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 31, 2024
@shraddhabang
Copy link
Collaborator

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 31, 2024
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 31, 2024
jsonString, err := d.Marshal(stack)
assert.Equal(t, nil, err)
assert.JSONEq(t, tt.wantValue, jsonString)
assert.JSONEq(t, tt.wantValue, jsonString)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Added assert twice by mistake.

@shraddhabang
Copy link
Collaborator

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 31, 2024
@shraddhabang shraddhabang merged commit 73b1f0e into kubernetes-sigs:main Oct 31, 2024
4 of 5 checks passed
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: shethyogita83, shraddhabang, zac-nixon
Once this PR has been reviewed and has the lgtm label, please assign m00nf1sh for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants