Post

Verify Cilium Subnet Routes Before Talos Access

Verify Cilium Subnet Routes Before Talos Access

The CI pipeline now checks that Cilium routes are disabled before any Talos interaction, ensuring the homelab’s network state is stable and free of overlapping CIDRs.

Adjusting the Cilium Migration Check to Disable Route Acceptance

I added --accept-routes=false to the cilium-migration-check.yml job arguments and replaced the old tailscale set command with a tailscale debug prefs query that asserts RouteAll and the exit node fields are empty. This forces the runner to join Tailscale with subnet route acceptance turned off, guaranteeing that no routes are being accepted before the Talos preflight runs.

Documenting the Pre‑flight Subnet Acceptance Gate

The README now states that after tool preparation the CI identity joins Tailscale with subnet route acceptance disabled, then verifies that the scoped identity sees only the approved router offering the exact subnet using Tailscale’s routing prefixes. The topology doc adds a check that the runner’s allowed prefixes for the reviewed router are validated before enabling subnet acceptance, rejecting any competing routes and confirming the decision again before reading Talos route inventories.

Enhancing Route Parsing in the Platform Maintenance Stage

The scripts/ci/platform-maintenance-stage.sh file was expanded to introduce a robust read_talos_routes function. New variables such as subnet_routes, route_owners, and select_peer let the script examine every candidate route, filter peers by the tag:homelab-ci-apply tag, and ensure the peer’s TailscaleIPs are in the 100.x.x.x range while the peer is running and not expired. This replaces the previous one‑liner and makes route ownership verification far more reliable.

Why This Matters for Homelab Network Reliability

By asserting that routes are disabled and that the CI identity only sees the intended router, the pipeline prevents accidental route leakage that could corrupt Talos access. The same pattern of explicit pre‑flight checks and enhanced route parsing can be applied to other clusters where a small reader identity must own source configuration while the workload mounts only derived, read‑only secrets. A platform team facing similar subnet‑routing concerns can adopt this verification gate to keep network state predictable before any external service interaction.

This post is licensed under CC BY 4.0 by the author.