Post

Restore Protected Cilium Route Preflight in Migration Workflow

Restore Protected Cilium Route Preflight in Migration Workflow

I added a dedicated preflight-checks job and a protected route‑preflight job to the homelab Cilium migration workflow, ensuring that every dispatch against the reviewed main commit validates the Cilium route CIDR against live Kubernetes and Tailscale inventories before any rollout proceeds.

New workflow structure in cilium-migration-check.yml

The YAML now defines an expected_sha input that defaults to the current main SHA when the workflow is triggered manually. A preflight-checks job re‑runs the deployment‑checks workflow with that SHA and the reuse_main_offline flag. A subsequent route-preflight job is protected: it only runs on main, uses the homelab production Tailscale CI identity, and times out after 35 minutes. Its steps check out the repository, verify that the git SHA matches the expected one, and then invoke the preflight logic.

Documentation updates for cluster topology and Cilium

The homelab Cilium README now describes the protected route preflight step and the workflow dispatch command (gh workflow run cilium-migration-check.yml --repo Stuhlmuller/homelab --ref main -f "expected_sha=$sha"). The architecture page was edited to note that the protected preflight runs with the production Tailscale identity and stores revision‑bound route evidence in a private receipt under the application backup bucket.

Policy enforcement in workflows.rego

The Regola policy now includes an approved_cilium_route_preflight rule that requires exactly one on: true key in the input and unions the remaining keys with workflow_events. A deny rule blocks any scripts/ci/platform-maintenance-stage.sh execution unless approved_platform_maintenance or approved_cilium_route_preflight is satisfied, reinforcing that the route preflight must be the approved gate.

Offline checks script additions

The scripts/ci/offline-checks.sh helper now lists the new workflow file sections (coexistence, preflight-checks, route-preflight) in its expected‑credentialed‑job inventory, and the hash‑verification loop was extended to include the route-preflight entry so that offline audits can confirm the exact SHA and job presence without running the full CI pipeline.

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