Skip to content
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 IPv6 NAT #4952

Merged
merged 3 commits into from
Jan 19, 2022
Merged

Add IPv6 NAT #4952

merged 3 commits into from
Jan 19, 2022

Conversation

rbrtbnfgl
Copy link
Contributor

Proposed Changes

Enable IPv6 NAT to the pod internet traffic. (It requires to use flannel-ipv6-masq flag on the server configuration)

Types of Changes

New Feature

Verification

Add flannel-ipv6-masq: true on the server configuration when IPv6 is enabled.
Running ip6tables-save | grep MASQUERADE on any node of the cluster and the output should contain the masquerading rules like this:

-A POSTROUTING -s 2001:cafe:43::/56 ! -d ff00::/8 -j MASQUERADE --random-fully
-A POSTROUTING ! -s 2001:cafe:43::/56 -d 2001:cafe:43::/56 -j MASQUERADE --random-fully

Linked Issues

#4683

User-Facing Change


Further Comments

@rbrtbnfgl rbrtbnfgl requested a review from manuelbuil January 14, 2022 17:00
@rbrtbnfgl rbrtbnfgl requested a review from a team as a code owner January 14, 2022 17:00
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@gmail.com>
Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@gmail.com>
@rbrtbnfgl rbrtbnfgl force-pushed the ipv6-nat branch 2 times, most recently from 34f3714 to 111c166 Compare January 14, 2022 17:53
Copy link
Member

@brandond brandond left a comment

Choose a reason for hiding this comment

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

Do we need to do anything in the Flannel subnet file, similar to the FLANNEL_IPMASQ variable for IPv4 masq at

_, err = fmt.Fprintf(f, "FLANNEL_IPMASQ=%v\n", ipMasq)

Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@gmail.com>
@rbrtbnfgl
Copy link
Contributor Author

rbrtbnfgl commented Jan 18, 2022

Do we need to do anything in the Flannel subnet file, similar to the FLANNEL_IPMASQ variable for IPv4 masq at

_, err = fmt.Fprintf(f, "FLANNEL_IPMASQ=%v\n", ipMasq)

We do not need to add it because the current version of the flannel binary does not add any masquerading rules so we have to add them before.

@manuelbuil
Copy link
Contributor

The error seems to be a flaky:

[PARALLEL] Summarizing 2 Failures:
[PARALLEL] 
[PARALLEL] [Fail] [sig-network] Proxy version v1 [It] A set of valid responses are returned for both pod and service ProxyWithPath [Conformance] 
[PARALLEL] /workspace/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/network/proxy.go:314
[PARALLEL] 
[PARALLEL] [Fail] [sig-node] Pods [It] should run through the lifecycle of Pods and PodStatus [Conformance] 
[PARALLEL] /workspace/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/common/node/pods.go:1054

CI works in v1.22 and v1.21

@rbrtbnfgl rbrtbnfgl merged commit bb856c6 into k3s-io:master Jan 19, 2022
@rbrtbnfgl rbrtbnfgl deleted the ipv6-nat branch January 19, 2022 09:33
@rbrtbnfgl rbrtbnfgl restored the ipv6-nat branch January 19, 2022 09:33
@rbrtbnfgl rbrtbnfgl deleted the ipv6-nat branch January 19, 2022 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants