-
Notifications
You must be signed in to change notification settings - Fork 5.1k
cni: add ipv6/dual-stack support for calico cni #22065
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
base: master
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kartikjoshi21 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 |
|
Hi @kartikjoshi21. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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. |
|
Logs: |
|
Can one of the admins verify this patch? |
medyagh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you plz add a Before/After this PR or maybe run an example in the description
d75647e to
9f4158b
Compare
|
Hii @medyagh thankyou for looking into it. I have added PR description along with testing steps which contain example of running it. |
cni: add ipv6/dual-stack support for bridge, calico, cilium
KIC/OCI: switch default IPv6 subnet for kic networks from fd00::/64 to
fd01::/64 to avoid overlap with Docker’s own IPv6 pools (fixed-cidr-v6).
When deleting, remove the actual network in use (NodeConfig.Network if
set, otherwise ClusterName).
Bridge CNI: replace the static text/template with a JSON-backed
conflist generator that understands IPv4-only, IPv6-only, and dual
PodCIDRs. Plumb PodCIDR/PodCIDRv6 from KubernetesConfig into host-local
ranges, prefer explicit CIDRs over defaults, and avoid IPv6 masquerade
(ipMasq only for IPv4).
Bridge CNI (CIDR reporting): update Bridge.CIDR() to prefer PodCIDRv6
for ipv6-only clusters, otherwise PodCIDR, falling back to the legacy
DefaultPodCIDR for old configs.
Calico CNI: extend the Calico template inputs with IPFamily,
PodCIDR/PodCIDRv6, ServiceCIDR/ServiceCIDRv6 and per-family enable
flags. Add a lightweight
seed-nodenameinitContainer, wireIP/IP6/FELIX_IPV6SUPPORT from the chosen family, and add a bandwidth
plugin. Keep kube-controllers IPv6-safe by optionally using hostNetwork
and KUBERNETES_SERVICE_HOST=::1 for ipv6-only clusters.
Calico IPPools: after applying the main manifest and waiting for the
IPPool CRD to become Established, render and apply explicit v4/v6
IPPools based on PodCIDR/PodCIDRv6. Calico CNI now uses those pools
via assign_ipv4/assign_ipv6 and ipv4_pools/ipv6_pools.
Calico CIDR reporting: make Calico.CIDR() align with the bridge
behaviour (prefer PodCIDRv6 for ipv6-only, otherwise PodCIDR, then
DefaultPodCIDR).
CRI-O: make enableIPForwarding best-effort for both families by
loading br_netfilter (if available) and setting bridge netfilter and
IPv4/IPv6 forwarding sysctls, instead of only echoing to ip_forward.
util: keep ServiceClusterIP() and pickPrimaryServiceCIDR() behaviour
intact while documenting IPv4/IPv6 handling and sharing helpers across
dual-stack callers.
Fixes: #8535
Refer to this for testing steps: #22065 (comment)
Tested and verified on:
Signed-off-by: Kartik Joshi [email protected]