Post

Share Bazel cache origins across two public tunnel connectors

Share Bazel cache origins across two public tunnel connectors

Two public tunnel connectors previously pointed at separate origins for Bazel cache traffic. This push makes both octelium-public and public-tunnel share the same Bazel backend origin, with each connector serving routes matching ^/(ac|cas)/[a-f0-9]{64}$ and falling back to an HTTP 404 service. The network policy tests are updated to allow cloudflared from both the octelium-public and public-tunnel namespaces to reach openwiki on TCP 8080, with egress from public-tunnel back into the openwiki namespace. Documentation now references the public-tunnel Application instead of the older octelium-public name.

Shared origin across public tunnel connectors

Both the octelium-public and public-tunnel connectors now declare routes to the same Bazel cache origin. Each connector matches the content-addressable storage path pattern ^/(ac|cas)/[a-f0-9]{64}$ and returns a 404 service for unmatched paths. The connectors retain their configured OpenWiki origin while public DNS for it remains unpublished, and the apex stays on the legacy connector for Octelium login and callbacks.

Network policy for cloudflared ingress and egress

The network-policy-peers-test.py tests now expect cloudflared pods labeled with app.kubernetes.io/name and app.kubernetes.io/part-of in both octelium-public and public-tunnel namespaces to reach openwiki over TCP port 8080. A separate egress policy allows traffic from public-tunnel’s cloudflared-egress into the openwiki namespace on the same port. These tests validate that the shared origin does not require loosening boundaries beyond the two expected namespaces.

Runbook and documentation alignment

The Bazel cache documentation now instructs operators to verify the public-tunnel Application with the exact current main SHA, confirm its cache backend is Ready, and check that the new Secret accepts the existing writer. The tailnet ingress runbook notes that both connectors use the same Bazel backend and retain the OpenWiki origin. The workload inventory update clarifies that source declaration checks do not prove rollout.

Applying the same pattern to multi-connector services

A platform team running multiple public tunnel frontends behind one backend can use this pattern: declare identical route matches on each connector, enforce namespace-scoped network policies for the ingress proxy, and document the exact Application and Secret names operators should verify after a cutover. The same approach works for any service where two connectors must share an origin without merging their network boundaries.

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