Tracking for what needs to be done for dual-stack support.
-
Configuration (pkg/config/):
-
Node startup/configuration (pkg/node/):
-
Node management (mostly pkg/ovn/):
-
Pods
-
CNI (pkg/cni/):
-
Services. (Note that for services, dual-stack just means allowing both single-stack-IPv4 Services and single-stack-IPv6 Services in the same cluster; no individual Service is itself dual-stack)
-
NetworkPolicy
We need separate IPv4 and IPv6 address sets. (The idea about using port groups instead of address sets didn't pan out; inport only indicates the ingress port on the current logical switch, so for inter-node traffic we lose the original source port.)
-
Unknowns
cc @dcbw @russellb
Tracking for what needs to be done for dual-stack support.
Configuration (
pkg/config/):--secondary-service-cidrlike upstream kube, or via--service-cidrs) (fix up config for dual-stack, add dual-stack service CIDRs #1189)config.IPv6Mode. Should we add a parallelconfig.IPv4Mode? Or haveconfig.IPModewithIPv4,IPv6, andDualStackoptions? Note that in many places where we currently checkconfig.IPv6Mode, the more dual-stack friendly option is to just look at the IP address currently being operated on and act based on that. (fix up config for dual-stack, add dual-stack service CIDRs #1189)Node startup/configuration (
pkg/node/):k8s.ovn.org/l3-gateway-configannotation needs to allow dual-stackip-addressandnext-hop(dual-stack support for l3-gateway-config annotation #1239)pkg/node/management-port*.go:createPlatformManagementPort()needs to configure dual-stack IP/default route and service CIDR route (dual stack management port creation #1241)pkg/util/kube.go:GetNodeIP()doesn't actually need to be dual-stack for the one place it's used (defaultovn-encap-ip), but it should have a better name in that case (Misc dual-stack bits #1461)Node management (mostly
pkg/ovn/):"k8s.ovn.org/node-subnets","k8s.ovn.org/node-join-subnets") to be dual-stack (Make host subnet/join subnet annotation dual-stack #1283)pkg/ovn/ovn.go:WatchNodes()needs to handle IPv4 and IPv6 host subnets (Make host subnet/join subnet annotation dual-stack #1283)pkg/ovn/master.go:addNode()needs to allocate and annotate both IPv4 and IPv6 host subnets (Make host subnet/join subnet annotation dual-stack #1283)pkg/ovn/master.go:addNode()/ensureNodeLogicalNetwork()need to configure a single logical switch with information about both IPv4 and IPv6. (Make host subnet/join subnet annotation dual-stack #1283)pkg/ovn/master.go:syncNodeManagementPort()needs to set up management port for both IPv4 and IPv6 (Make host subnet/join subnet annotation dual-stack #1283)pkg/ovn/master.go:syncGatewayLogicalNetwork()(Make host subnet/join subnet annotation dual-stack #1283)pkg/util/gateway_init.go:GatewayInit()needs to take, and handle, multiplejoinSubnetStr,nicIP,defaultGW,rampoutIPSubnet(dual-stack support for creating gateway in OVN #1256)pkg/util/gateway_cleanup.go:GatewayCleanup()needs tostaticRouteCleanup()both IPv4 and IPv6 routes (dual-stack support for creating gateway in OVN #1256)Pods
pkg/util/util.go, etc) to indicate both IPv4 and IPv6 IPs. (update pod annotation and CNI shim communication for dual-stack #1129)pkg/ovn/pods.go:getPodAddresses()/waitForPodAddresses()/pkg/util/net.go:GetPortAddresses()need to handle multiple IPs (dualstack support for GetPortAddresses #1325)pkg/ovn/pods.go:getRoutesGatewayIP()needs to return multiple IPs and routes. (Redo it to take autil.PodAnnotationobject and fill in the gateway/routes fields) (dualstack support for GetPortAddresses #1325)pkg/ovn/pods.go:addLogicalPort()lsp-set-addresses(dualstack support for GetPortAddresses #1325)lsp-set-port-security(dualstack support for GetPortAddresses #1325)pkg/ovn/port_cache.go: needs to handle multiple pod IPs (ovn: add multiple pod IPs to port cache #1373)CNI (
pkg/cni/):ConfigureInterfacemust set both IPs asexternal_ids. (update pod annotation and CNI shim communication for dual-stack #1129)Services. (Note that for services, dual-stack just means allowing both single-stack-IPv4 Services and single-stack-IPv6 Services in the same cluster; no individual Service is itself dual-stack)
createGatewaysVIP,handleNodePortLB) needs to create both IPv4 and IPv6 VIPs, and pick the correct one to use for each Service (initial dual-stack loadbalancer support #1234)pkg/node/gateway_localnet.go:localnetAddService()/localnetDeleteService()need to add/delete IPv4 or IPv6 rules depending on the service IP (node: dual-stack gateway setup #1480)pkg/node/gateway_localnet.go:localnetNodePortWatcher()needs to set up both iptables and ip6tables base rules (node: dual-stack gateway setup #1480)pkg/util/gateway_init.go:GetDefaultGatewayRouterIP(), used by ExternalIP handling, is IPv4-only, but it's also totally broken anyway... (ExternalP for ovn-kubernetes #978)NetworkPolicy
We need separate IPv4 and IPv6 address sets. (The idea about using port groups instead of address sets didn't pan out;
inportonly indicates the ingress port on the current logical switch, so for inter-node traffic we lose the original source port.)pkg/ovn/namespace.go:addPodToNamespace()/deletePodFromNamespace()/AddNamespace()need to check/add/remove multiple IPs from address sets (Dual stack support for address set and network policies. #1393)pkg/ovn/common.goneeds to update naming to allow separate IPv4 and IPv6 sets for each namespace (Dual stack support for address set and network policies. #1393)pkg/ovn/policy_common.go:getL3MatchFromAddressSet()needs to match "IPv4-expression || IPv6-expression" (Dual stack support for address set and network policies. #1393)pkg/ovn/policy_common.go:ipMatch()needs to be based on the IP address in question, not the global mode (Dual stack support for address set and network policies. #1393 / Dual stack support for IP blocks in network policy #1428)pkg/ovn/policy_common.go:addAllowACLFromNode()needs to allow from both IPv4 or IPv6 address (Dual stack support for address set and network policies. #1393)Unknowns
cc @dcbw @russellb