Skip to content

docs: Correct VRF/route granularity in ingress sidecar plan - #377

Open
privateip wants to merge 2 commits into
mainfrom
docs/855-ingress-sidecar-plan-revisions
Open

docs: Correct VRF/route granularity in ingress sidecar plan#377
privateip wants to merge 2 commits into
mainfrom
docs/855-ingress-sidecar-plan-revisions

Conversation

@privateip

Copy link
Copy Markdown
Contributor

Summary

The #855 implementation plan keyed the sidecar's VRF and SRv6 route by the (vpc, vpcAttachment) tenant label, but the primitives it reuses key the kernel VRF by (vpc, node) only, and per-pod SIDs vary by hosting node even within one tenant. This revises the plan to a two-tier model — VRF lifecycle per VPC, route lifecycle per pod — fixes the primitive signatures and a misleading reconciler-file reference, and adds two previously-undiscussed risks (RBAC blast radius, per-replica platform-wide state) to the open decisions list.

Test plan

  • Plan's VRF/route granularity, primitive signatures, and reconciler reference are consistent throughout, with no remaining per-tenant VRF claims

Related to datum-cloud/enhancements#855

The #855 plan modeled the sidecar's VRF and SRv6 route as keyed by the (vpc, vpcAttachment) tenant label, but that contradicts the primitives it's built on: internal/crdnames.BGPVRFInstanceName documents the kernel VRF as keyed by (vpc, node), shared across every attachment of a VPC on a node, and internal/plumbing/vrf's Add/Delete/TableID and intf.GenerateInterfaceNameVRF all take vpc alone — there's no attachment-scoped variant. Each pod's SID also varies by its own hosting node (ComputeSID's nodeID parameter), so pods of the same tenant on different nodes carry different SIDs, meaning "one route per tenant" doesn't hold either.

This revises the plan to a two-tier reconcile model: VRF lifecycle keyed by VPC alone, route lifecycle keyed by individual EndpointSlice (pod), with the tenant label used only for slice discovery/grouping, never as the kernel-side key. Also fixes the primitive function signatures in section 2 to match reality, corrects a reference that pointed at bgpvrfinstance_controller.go (an empty passthrough reconciler) instead of internal/reconcile/reconcile.go for the actual desired-state diffing pattern, adds the sidecar's flock-path reuse (/var/lib/cni/galactic-vrf) as a third pre-merge verification item alongside the two already flagged, and adds two new open decisions: RBAC blast radius of the cluster-wide EndpointSlice watch, and the platform-wide kernel state every gateway replica ends up carrying under the corrected #796 scope.

No code changes — this is a planning document only, ahead of implementation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@privateip
privateip requested a review from a team as a code owner August 13, 2026 17:09
kevwilliams
kevwilliams previously approved these changes Aug 13, 2026
@privateip privateip linked an issue Aug 13, 2026 that may be closed by this pull request
8 tasks
Settles §9's four still-open items from the prior revision pass:

- RBAC blast radius (item 8): accept the recommended read-only
  ClusterRole as final, flag for #856's manifest reviewer
- Per-replica platform-wide state (item 9): accept as-is for v1,
  lean on §6's VRF/route-count metrics and revisit at scale
- Teardown grace-period interval (item 1): settle as a configurable
  knob with a 30s placeholder default, pending real #857 latency data
- #856 deployment contract (item 3): confirm it stays a flagged
  dependency rather than writing it out further

No scope or design changes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ingress sidecar for VPC backend connectivity

2 participants