cilium (Update): route c1 ClusterIPs and Pi PodCIDRs to the LAN (#1740) #1748

Merged
ginjiruu merged 2 commits from c1-clusterip-bgp into main 2026-11-20 03:00:15 +00:00
Owner

Closes #1740. Draft: not for merge until the decisions below are made. It rolls Cilium on all seven c1 nodes.

LAN clients get direct access to c1 ClusterIPs. The c1 recursor already resolves <svc>.<ns>.svc.c1.caosh.int.animeteamspeak.moe LAN-wide (#1673), but the address it returns doesn't route yet.

Changes

  • clusters/c1/cilium/bgp/bgpadvertisement.yaml: ClusterIP is added to the Service addresses. Each ClusterIP goes out as a /32 (and a /128 for dual-stack Services) from all three thinks, and the routers ECMP across them.
  • clusters/c1/cilium/release/helmrelease.yaml: bpf.lbExternalClusterIP: true. Without it Cilium drops off-cluster traffic to a ClusterIP even with a route. cilium-values-nix sets no bpf key, so this layer only adds the key.

What I checked (2026-11-19, from arch-ws on VLAN 30)

Address Reachable today After this PR
LoadBalancer 10.30.100.x yes yes
Pod IPs on thinks, 10.30.128-130.x yes (recursor pod answered on its pod IP) yes
ClusterIPs 10.30.192.0/20 no: the routers have no route and answer "network unreachable" yes, via any think
Pod IPs on Pis, 10.30.131-134.x no: only the thinks peer, so the Pi PodCIDRs are not announced yes: the Pis peer too (with lab/iac#166)

Router side: no change. RouterOS accepts every received route, because no input filter is set (iac bgp.tf, input filters are the rest of iac#125), and the output chain advertises nothing back.

Decisions for you

  1. Which zones may reach the service range. Today's zone firewall: only ZONE-TRUSTED (VLAN 30 and the legacy LAN, where mini lives) forwards to anything. mgmt, iot and guest reach only the WAN and the recursor. servers reaches only the WAN. Merging as-is therefore means trusted clients reach every c1 Service, the internal ones included: the PowerDNS API on pdns-primary:8081, databases, metrics, webhooks. c1 has 4 network policies in total. Options:
    • (a) accept trusted-to-all. No iac change.
    • (b) add CiliumNetworkPolicies for the sensitive Services first.
    • (c) narrow it on the routers, e.g. trusted may reach 10.30.192.0/20 only on listed ports. That's a separate iac PR.
  2. IPv6. Dual-stack Services (the recursor, for example) get their v6 ClusterIP announced on the v6 sessions too. firewall6.tf lets trusted reach anything, so the same exposure applies over v6. Fine, or filter?

Rollout

  • Pi peering: new BGP sessions only, no restart.
  • bpf.lbExternalClusterIP changes cilium-config, and operator.rollOutPods rolls the operator and every agent. Agent restarts keep the loaded datapath, but it's still a CNI roll on all seven nodes: merge while watching.
  • The advertisement change alone is live on the next BGP reconcile, with no restart.

After merge:

  • ip route on a router (or /rest/ip/route) shows 10.30.192.x/32 via 10.30.20.21/.22/.23.
  • curl -k https://kubernetes.default.svc.c1.caosh.int.animeteamspeak.moe/version from arch-ws answers (HTTP 401/403 is fine).
  • dig @pdns-secondary-0.dns.svc.c1.caosh.int.animeteamspeak.moe int.animeteamspeak.moe SOA answers through the ClusterIP 10.30.192.55.
  • Pick a Service whose only backend runs on a Pi and confirm it answers: that proves the think forwards to Pi backends and the replies come back the same way.

Pis peer too

bgpclusterconfig.yaml now selects node-class think and pi. Each Pi announces its own PodCIDR and the Service /32s; the routers ECMP over seven nodes instead of three. Router side: lab/iac#166 adds the four Pi connections; merge order between the two does not matter (each side idles until the other exists).

Trade-off to know: Pis have 1G NICs (and the Ceph mons). With eTP Cluster Services (the gateway, pdns-auth, every ClusterIP) a share of flows now enters through a Pi and is forwarded to the backend. If that matters, split it: a second CiliumBGPPeerConfig for the Pis that advertises only their PodCIDR.

Not in this PR

  • No sim. The lab harness has no c1 Cilium BGP. Checks: kustomize build and the pre-push gate.
Closes #1740. **Draft: not for merge until the decisions below are made.** It rolls Cilium on all seven c1 nodes. LAN clients get direct access to c1 ClusterIPs. The c1 recursor already resolves `<svc>.<ns>.svc.c1.caosh.int.animeteamspeak.moe` LAN-wide (#1673), but the address it returns doesn't route yet. ## Changes - `clusters/c1/cilium/bgp/bgpadvertisement.yaml`: `ClusterIP` is added to the Service addresses. Each ClusterIP goes out as a /32 (and a /128 for dual-stack Services) from all three thinks, and the routers ECMP across them. - `clusters/c1/cilium/release/helmrelease.yaml`: `bpf.lbExternalClusterIP: true`. Without it Cilium drops off-cluster traffic to a ClusterIP even with a route. `cilium-values-nix` sets no `bpf` key, so this layer only adds the key. ## What I checked (2026-11-19, from arch-ws on VLAN 30) | Address | Reachable today | After this PR | |---|---|---| | LoadBalancer `10.30.100.x` | yes | yes | | Pod IPs on thinks, `10.30.128-130.x` | yes (recursor pod answered on its pod IP) | yes | | ClusterIPs `10.30.192.0/20` | no: the routers have no route and answer "network unreachable" | yes, via any think | | Pod IPs on Pis, `10.30.131-134.x` | no: only the thinks peer, so the Pi PodCIDRs are not announced | yes: the Pis peer too (with lab/iac#166) | Router side: no change. RouterOS accepts every received route, because no input filter is set (iac `bgp.tf`, input filters are the rest of iac#125), and the output chain advertises nothing back. ## Decisions for you 1. **Which zones may reach the service range.** Today's zone firewall: only `ZONE-TRUSTED` (VLAN 30 and the legacy LAN, where mini lives) forwards to anything. mgmt, iot and guest reach only the WAN and the recursor. servers reaches only the WAN. Merging as-is therefore means trusted clients reach every c1 Service, the internal ones included: the PowerDNS API on `pdns-primary:8081`, databases, metrics, webhooks. c1 has 4 network policies in total. Options: - (a) accept trusted-to-all. No iac change. - (b) add CiliumNetworkPolicies for the sensitive Services first. - (c) narrow it on the routers, e.g. trusted may reach `10.30.192.0/20` only on listed ports. That's a separate iac PR. 2. **IPv6.** Dual-stack Services (the recursor, for example) get their v6 ClusterIP announced on the v6 sessions too. `firewall6.tf` lets trusted reach anything, so the same exposure applies over v6. Fine, or filter? ## Rollout - Pi peering: new BGP sessions only, no restart. - `bpf.lbExternalClusterIP` changes `cilium-config`, and `operator.rollOutPods` rolls the operator and every agent. Agent restarts keep the loaded datapath, but it's still a CNI roll on all seven nodes: merge while watching. - The advertisement change alone is live on the next BGP reconcile, with no restart. After merge: - `ip route` on a router (or `/rest/ip/route`) shows `10.30.192.x/32` via `10.30.20.21/.22/.23`. - `curl -k https://kubernetes.default.svc.c1.caosh.int.animeteamspeak.moe/version` from arch-ws answers (HTTP 401/403 is fine). - `dig @pdns-secondary-0.dns.svc.c1.caosh.int.animeteamspeak.moe int.animeteamspeak.moe SOA` answers through the ClusterIP `10.30.192.55`. - Pick a Service whose only backend runs on a Pi and confirm it answers: that proves the think forwards to Pi backends and the replies come back the same way. ## Pis peer too `bgpclusterconfig.yaml` now selects `node-class` think **and** pi. Each Pi announces its own PodCIDR and the Service /32s; the routers ECMP over seven nodes instead of three. Router side: **lab/iac#166** adds the four Pi connections; merge order between the two does not matter (each side idles until the other exists). Trade-off to know: Pis have 1G NICs (and the Ceph mons). With eTP Cluster Services (the gateway, `pdns-auth`, every ClusterIP) a share of flows now enters through a Pi and is forwarded to the backend. If that matters, split it: a second `CiliumBGPPeerConfig` for the Pis that advertises only their PodCIDR. ## Not in this PR - **No sim.** The lab harness has no c1 Cilium BGP. Checks: `kustomize build` and the pre-push gate.
LAN clients reach <svc>.<ns>.svc.c1.caosh.int directly (#1740). ClusterIP
added to the Service advertisement (thinks, ECMP); bpf.lbExternalClusterIP
lets the datapath accept off-cluster traffic to ClusterIPs. Draft: zone
exposure decision pending.
ginjiruu changed title from WIP: cilium (Update): route c1 ClusterIPs to the LAN (#1740) to WIP: cilium (Update): route c1 ClusterIPs and Pi PodCIDRs to the LAN (#1740) 2026-11-20 01:45:41 +00:00
All seven nodes peer: Pi PodCIDRs route from the LAN, Service /32s ECMP
over every node. Router side lab/iac#166.
ginjiruu changed title from WIP: cilium (Update): route c1 ClusterIPs and Pi PodCIDRs to the LAN (#1740) to cilium (Update): route c1 ClusterIPs and Pi PodCIDRs to the LAN (#1740) 2026-11-20 02:58:07 +00:00
Sign in to join this conversation.
No description provided.