Skip to content

Route Envoy traffic to remote backends through the host VRF #1487

Closed

Description

@privateip

Goal

Let an Envoy proxy that uses the galactic-vrf sidecar reach tenant backends on other nodes. #1439 delivers local backends only.

Background

#1439's sidecar SRv6-encapsulates traffic to remote backends inside the pod and sends it out the pod's primary interface. On nodes running Cilium, Cilium's ingress hook on the pod's host veth drops that traffic as source spoofing. The outer source is the node's SID, not the pod's address. Routing to the remote SIDs is correct; the packet is dropped before it reaches it. Giving the sidecar a per-pod outer source would need per-pod entries in a shared per-node map that host tenants also use, and the traffic would still depend on the CNI forwarding packets that leave the cluster.

Work

  • Send remote-backend traffic from the proxy over its routed link into the host VPC VRF, instead of encapsulating it in the pod.
  • Worker attaches the host egress datapath on the routed link's host end, so the proxy's traffic leaves through the host fabric path the same way a tenant's does. Worker already owns that end.
  • Remove the sidecar's in-pod remote encapsulation, or keep it only behind an explicit opt-in.
  • Update the Worker contract, the ownership table and the galactic-vrf Component docs.

Acceptance

  • Unit and root tests for the routing and the egress attach on the routed link's host end.
  • Lab, Worker mode, on a node whose pods run on Cilium: the Envoy case's remote rows pass for both VPCs, and the local rows still pass.
  • task ci passes.

Prerequisites

#1439 merged (the sidecar, its claims, and the local-backend path).

Part of #1430.

Activity

  1. added theissue type on Nov 21, 2026
  2. privateip commented on Nov 21, 2026

    @privateip
    ContributorAuthor

    Verdict: valid. The proxy cannot reach a backend on another node through the galactic-vrf sidecar today. The sidecar SRv6-encapsulates that traffic inside the pod and sends it out of the pod's primary interface with the node's SRv6 address as the outer source. A primary CNI that checks a pod's source address, as Cilium does, drops it on the pod's host veth. #1439 confirmed this in the lab with a kernel drop trace.

    Approved plan:

    1. Pod side. In Worker mode the sidecar creates each pod VRF itself and gives it a single default route through the routed link to the host end's link-local address, with the gateway as its source. That replaces both the route into the in-pod encapsulation and the per-backend /128 routes, so local and remote backends both cross the link, and the host VPC VRF decides.
    2. Worker side. Worker's Local module registers the routed link's host end like a tenant link. It writes the ifindex_vrf_table and egress-kind rows, attaches usid_service_egress and usid_egress on ingress and tp_deliver on egress, and removes them all on release. Worker's Fabric module already writes the claim's remote routes into the host VRF table, and replies already return over the link. Worker also makes sure the node's SRv6 source address is registered.
    3. Guard first. The routed link's source guard moves to the head of the host end's tcx ingress chain, so it runs before the clsact egress filters, whatever re-chains them. If Worker cannot put it first, it reports RoutedLinkEgressUnavailable and attaches no egress datapath. The node health check treats the guard as the datapath's own program.
    4. Traffic policy. The host end is registered as an infrastructure interface. That matches today's local path: the proxy's egress is not subject to proxy-side traffic policy, and each backend's interface still enforces its own.
    5. In-pod encapsulation. It stays behind an opt-in flag, off by default. With the flag off, the sidecar removes what an earlier sidecar left in the pod. Deleting the code is a separate follow-up.
    6. Docs. The Worker contract, the ownership table and the galactic-vrf Component README.

    Tests:

    • Root tests cover the routed link's host end: guard order and rows; remote traffic leaving encapsulated toward its SID; local traffic passing to the kernel; a spoofed source dropped before encapsulation; and clean release.
    • Further root tests show the guard stays first after the egress datapath is re-chained, after node GC and installer repair, and after another tcx program attaches later.
    • Sidecar root tests cover the VRF, the default route and the pruning.
    • In the lab, the Envoy case's remote rows return for both VPCs on a node whose pods run on Cilium, along with a row proving a spoofed source from the pod end never leaves the node.
  3. self-assigned this
    on Nov 21, 2026
  4. privateip commented on Nov 22, 2026

    @privateip
    ContributorAuthor

    Delivered by #1489, merged into integration/galactic-worker as dfa2212. The lab's Envoy case passed at c5c4c01 with 276 rows and none failed: remote rows for both VPCs on a node whose pods run on Cilium, the spoofed-source window, and the local rows, followed by the lab's verification on the same deploy. The evidence is on #1489. Deleting the sidecar's in-pod encapsulation and proxy-side traffic policy are listed there as follow-ups, not filed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions