Network plan: shared site network for WireGuard + ClusterMesh #1533

Open
opened 2026-08-13 22:59:13 +00:00 by ginjiruu · 3 comments
Owner

Network plan: shared site network for WireGuard + ClusterMesh

Address-planning ticket for the hub architecture (part of #1532, decision D10). Before any WG config lands in machine-configs, decide how the sites address each other at L3.

What must be decided

1. Overlay subnet vs routed site LANs

Two ways the hub reaches each site:

  • WG overlay subnet: each site gets a WG-allocated address (e.g. 10.99.x.y), hub routes to sites by WG IP; the apiserver and agentgateway dial by WG address.
  • Routed site LANs: WG is a pure tunnel; each site keeps its existing LAN subnet (mini 10.10.6.0/24, portable 10.10.5.0/24, think 10.10.1.0/24), WG routes those LANs between sites. The hub reaches each apiserver by its existing IP/VIP.

Trade-offs: overlay isolates addressing but forces tls-san + DNS to use WG IPs; routed-LAN reuses existing IPs/VIPs but requires non-overlapping LAN ranges across sites and hub-side routing entries.

2. Interaction with Cilium ClusterMesh prerequisites

From #1528 and the Cilium setup docs:

  • ipv4NativeRoutingCIDR must cover all pod CIDRs across all mesh sites.
  • Non-overlapping pod CIDRs cluster-wide.
  • Node connectivity between clusters — this is the fabric WG provides; the question is whether pod traffic also transits WG (route pod CIDRs into WG) or uses a separate path.
  • WireGuard encryption mode consistency across mesh sites (from #1528: mini has it, portable does not yet).

3. tls-san impact

Whatever address agentgateway uses to dial a backend apiserver must be in that apiserver's serving cert. For routed-LAN: existing VIP/IP SANs already cover it. For overlay: the WG IP must be added to tlsSanExtra in the cluster module (machine-configs).

4. Hub placement of agentgateway + apiserver routes

agentgateway on portable needs one route per backend. Route by <cluster> name → resolves to the chosen L3 address. This is the data-plane map that replaces the haproxy SNI fan-out (#1527).

5. Site-by-site transport reality

D2 assumption (WG/UDP works everywhere) must be checked per site; TCP-egress-only sites need a documented fallback (frp/rathole L4 tunnel; ClusterMesh may not reach them).

Deliverables

  • Address plan written (overlay vs routed-LAN, per-site ranges, pod CIDR plan for ClusterMesh)
  • Non-overlapping LAN/pod CIDRs across all sites confirmed
  • tls-san list per cluster decided
  • WireGuard interface config spec (addresses, hub endpoint, PersistentKeepalive) for machine-configs
  • Firewalled/TCP-only site fallback chosen

Depends on / linked

  • #1532 (plan — this is D10)
  • #1528 (ClusterMesh — the fabric consumer)
  • iac#28 (T13 connectivity/kubeconfig distribution — the L4 side)
## Network plan: shared site network for WireGuard + ClusterMesh Address-planning ticket for the hub architecture (part of #1532, decision D10). Before any WG config lands in machine-configs, decide how the sites address each other at L3. ## What must be decided ### 1. Overlay subnet vs routed site LANs Two ways the hub reaches each site: - **WG overlay subnet**: each site gets a WG-allocated address (e.g. `10.99.x.y`), hub routes to sites by WG IP; the apiserver and agentgateway dial by WG address. - **Routed site LANs**: WG is a pure tunnel; each site keeps its existing LAN subnet (mini `10.10.6.0/24`, portable `10.10.5.0/24`, think `10.10.1.0/24`), WG routes those LANs between sites. The hub reaches each apiserver by its existing IP/VIP. Trade-offs: overlay isolates addressing but forces `tls-san` + DNS to use WG IPs; routed-LAN reuses existing IPs/VIPs but requires non-overlapping LAN ranges across sites and hub-side routing entries. ### 2. Interaction with Cilium ClusterMesh prerequisites From #1528 and the Cilium setup docs: - `ipv4NativeRoutingCIDR` must cover all pod CIDRs across all mesh sites. - Non-overlapping pod CIDRs cluster-wide. - Node connectivity between clusters — this is the fabric WG provides; the question is whether pod traffic also transits WG (route pod CIDRs into WG) or uses a separate path. - WireGuard encryption mode consistency across mesh sites (from #1528: mini has it, portable does not yet). ### 3. tls-san impact Whatever address agentgateway uses to dial a backend apiserver must be in that apiserver's serving cert. For routed-LAN: existing VIP/IP SANs already cover it. For overlay: the WG IP must be added to `tlsSanExtra` in the cluster module (machine-configs). ### 4. Hub placement of agentgateway + apiserver routes agentgateway on portable needs one route per backend. Route by `<cluster>` name → resolves to the chosen L3 address. This is the data-plane map that replaces the haproxy SNI fan-out (#1527). ### 5. Site-by-site transport reality D2 assumption (WG/UDP works everywhere) must be checked per site; TCP-egress-only sites need a documented fallback (frp/rathole L4 tunnel; ClusterMesh may not reach them). ## Deliverables - [ ] Address plan written (overlay vs routed-LAN, per-site ranges, pod CIDR plan for ClusterMesh) - [ ] Non-overlapping LAN/pod CIDRs across all sites confirmed - [ ] `tls-san` list per cluster decided - [ ] WireGuard interface config spec (addresses, hub endpoint, PersistentKeepalive) for machine-configs - [ ] Firewalled/TCP-only site fallback chosen ## Depends on / linked - #1532 (plan — this is D10) - #1528 (ClusterMesh — the fabric consumer) - iac#28 (T13 connectivity/kubeconfig distribution — the L4 side)
Author
Owner

Terminology correction (agentgateway → current architecture). agentgateway is no longer the component on portable that dials backend apiservers. That role is the k8s-hub (Cilium Gateway API + the authz-bridge). agentgateway is now AI-only.

So in this ticket, replace "agentgateway" with "the k8s-hub (Cilium gateway)" where it appears:

  • "the apiserver and agentgateway dial by WG address" → "the apiserver and the k8s-hub dial by WG address"
  • "Whatever address agentgateway uses to dial a backend apiserver" → "the k8s-hub"
  • "agentgateway on portable needs one route per backend… replaces the haproxy SNI fan-out (#1527)" → "the k8s-hub (Cilium gateway) on portable needs one route per backend." Note haproxy is already removed; the SNI fan-out is now per-hostname TLS passthrough in the Cilium gateway.
**Terminology correction (agentgateway → current architecture).** agentgateway is no longer the component on portable that dials backend apiservers. That role is the **k8s-hub** (Cilium Gateway API + the authz-bridge). agentgateway is now AI-only. So in this ticket, replace "agentgateway" with "the k8s-hub (Cilium gateway)" where it appears: - "the apiserver and agentgateway dial by WG address" → "the apiserver and the k8s-hub dial by WG address" - "Whatever address agentgateway uses to dial a backend apiserver" → "the k8s-hub" - "agentgateway on portable needs one route per backend… replaces the haproxy SNI fan-out (#1527)" → "the k8s-hub (Cilium gateway) on portable needs one route per backend." Note haproxy is already removed; the SNI fan-out is now per-hostname TLS passthrough in the Cilium gateway.
Author
Owner

Closing as superseded by lab/iac ADR-0008 and machine-configs ADR-0012, which settle site addressing and the c1 ranges. The remaining ClusterMesh prerequisites are tracked in #1528.

Closing as superseded by lab/iac ADR-0008 and machine-configs ADR-0012, which settle site addressing and the c1 ranges. The remaining ClusterMesh prerequisites are tracked in #1528.
Author
Owner

Reopened: the user reviewed the triage on 2026-11-22 and keeps the hub plan. It isn't incompatible with NetBird (iac ADR-0008), and Sveltos is still planned. The superseded close was a parallel session acting on the unreviewed proposal.

Reopened: the user reviewed the triage on 2026-11-22 and keeps the hub plan. It isn't incompatible with NetBird (iac ADR-0008), and Sveltos is still planned. The superseded close was a parallel session acting on the unreviewed proposal.
ginjiruu reopened this issue 2026-11-22 21:38:59 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lab/clusters#1533
No description provided.