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

ipv6: containerd routes support for IPv6 #15594

Merged
merged 1 commit into from Jul 6, 2023

Conversation

justinsb
Copy link
Member

@justinsb justinsb commented Jul 5, 2023

If using IPv6 and a kubenet-style CNI (which is more common with
IPv6), we need to support an IPv6 route on the pod, or else Pods will
be unable to reach other Pods.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 5, 2023
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 5, 2023
@hakman
Copy link
Member

hakman commented Jul 5, 2023

/retest

@@ -461,6 +461,13 @@ func (b *ContainerdBuilder) buildCNIConfigTemplateFile(c *fi.NodeupModelBuilderC
]
}
`

routes := `[{ "dst": "0.0.0.0/0" }]"`
Copy link
Member

Choose a reason for hiding this comment

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

Not blocking, but I dislike putting JSON strings in code. It's more maintainable if you call json.Marshal().

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I agree and I did debate structifying this, but I don't think it has a well-defined schema, much less a go type we can import - so it would be a big change. Or I could start with routes and we can gradually expand, but then it's weird that we are mixing approaches here.

Copy link
Member

Choose a reason for hiding this comment

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

You can use ad-hoc types like []map[string]string{{"dst":"0.0.0.0/0"}} or something like that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@justinsb justinsb force-pushed the containerd_ipv6 branch 2 times, most recently from 693e4be to f14eee4 Compare July 5, 2023 23:37
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 5, 2023
@johngmyers
Copy link
Member

Looks good, just need to update-expected.sh

@justinsb justinsb force-pushed the containerd_ipv6 branch 2 times, most recently from 52b9d35 to f4ffed6 Compare July 6, 2023 02:42
If using IPv6 and a kubenet-style CNI (which is more common with
IPv6), we need to support an IPv6 route on the pod, or else Pods will
be unable to reach other Pods.

Co-authored-by: Ciprian Hacman <ciprian@hakman.dev>
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 6, 2023
@johngmyers
Copy link
Member

We should probably have a containerdbuilder test that exercises the new functionality.

@justinsb
Copy link
Member Author

justinsb commented Jul 6, 2023

@johngmyers I tried adding a test and sadly we can't get more test coverage on the IPv6 side until we tweak which CNI providers work with IPv6 - right now kubenet is blocked. I'm not sure whether we want to enable IPv6 with kubenet itself or work on a different CNI. My current approach - which I'm whittling down to something more manageable - has kops-controller setting the node networking status condition ready with IPv6, but that relies on the cloudprovider setting the providerID, which relies on the CCM, which on some clouds relies on the node being ready. That might be an issue with the CCM providers (Hetzner has this dependency, GCE does not).

We do have coverage of the IPv4 case - you can see that the spacing changed because of json.Marshal

@johngmyers
Copy link
Member

We could probably unblock External, or we'd have to wait until GCE is unblocked.

/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 Jul 6, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johngmyers

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

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 6, 2023
@johngmyers
Copy link
Member

Ah, External not supported for 1.26+

@k8s-ci-robot k8s-ci-robot merged commit 37d6e61 into kubernetes:master Jul 6, 2023
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/nodeup 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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants