refactor: Remove router mode concept from galactic-router - #418
Merged
Conversation
privateip
requested review from
0xmc,
bmertens-datum,
ecv,
scotwells and
slindseysr
August 16, 2026 15:08
ecv
previously approved these changes
Aug 16, 2026
`galactic-router` accepted --mode=transit/fabric/tenant, but only tenant ever worked: fabric was a 42-line stub returning "not implemented" for every method, and transit was rejected at startup with a hard error. Every real manifest already hardcoded --mode=tenant, and the tenant/route-reflector split has always been carried entirely by --reflector + node affinity, independent of mode. This makes galactic-router GoBGP-only and hardcoded, with no --mode flag at all: - internal/config/router.go drops the Mode field, its env var/constants, and all mode-related Validate() rules. - cmd/galactic-router/root.go always builds a GoBGP RuntimeFactory directly, with no mode switch and no --mode/-m flag. - internal/reconcile.Reconciler's role filter is hardcoded to bgpv1alpha1.RouterRoleTenant instead of comparing against a configured mode string, so a stray non-tenant-role BGPRouter is still safely skipped rather than reconciled against the GoBGP runtime. A new test (TestBuildDesiredRouter_NodeAndRoleFilter) covers this skip/proceed behavior directly, since nothing exercised it before. - The dead RouterMode field on BGPRouterReconciler and the frr stub runtime package are deleted outright. - Both production DaemonSets drop the now-meaningless GALACTIC_ROUTER_ROUTER_MODE env entry. - Docs (architecture reference, router configuration, startup sequence, README, CLAUDE.md/AGENTS.md, conventions) are updated throughout to stop describing modes that never existed as real choices. Also removes RuntimeManager.StopAll, found while auditing this same runtime-abstraction layer: it had zero callers anywhere in the repo and was never wired to any mode. No backwards compatibility shim: --mode was already required and only tenant worked, so this is a hard break with no deprecated no-op flag. Verified: task build, task lint (0 issues), task test:unit, and task test:e2e all pass. Also applied to a live deploy/containerlab lab and ran task verify end-to-end (BGP fabric/peers/transit, EVPN routes, the gateway canary, and all four VPC ping scenarios) to confirm the hardcoded tenant-role filter and GoBGP-only startup behave identically to the mode-switched version in a real multi-cluster deployment. Fixes #417 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
privateip
force-pushed
the
refactor/router-417-remove-mode-concept
branch
from
August 16, 2026 15:25
6e8a496 to
8a85002
Compare
ecv
approved these changes
Aug 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
galactic-routeraccepted three operating modes, but only one ever worked — the other two were a stub that always failed and a value rejected at startup. Every real deployment already hardcoded the working mode, and the tenant/route-reflector split it's actually used for has always come from a separate flag, independent of mode. This removes the mode concept entirely: the router is now GoBGP-only, with no mode flag, env var, or stub backend to maintain.Test plan
Fixes #417