refactor: replace galactic-agent with galactic-router (controller-runtime)#120
Draft
privateip wants to merge 1 commit into
Draft
refactor: replace galactic-agent with galactic-router (controller-runtime)#120privateip wants to merge 1 commit into
privateip wants to merge 1 commit into
Conversation
…time) Replace the gRPC-based galactic-agent DaemonSet with a controller-runtime based galactic-router. Key changes: - Remove internal/agent, internal/bootstrap, internal/gobgp packages - Add internal/controller with BGPRouter, BGPPeer, BGPAdvertisement, BGPPolicy, Secret, Node reconcilers - Add internal/reconcile for CRD-to-DesiredRouter translation - Add internal/runtime with RuntimeFactory pattern (GoBGP tenant, FRR fabric stub) - Add internal/model for internal BGP types and internal/hash for change detection - Update deployment manifests, Dockerfile, containerlab config, and docs - Switch health probes to gRPC on port 5000; remove HTTP health and webhook ports - GoBGP starts lazily on first BGPRouter reconcile (listenPort=-1, outbound-only) - Hash-based no-op suppression prevents redundant GoBGP Apply calls
b87216d to
a653dc1
Compare
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
Replace the gRPC-based
galactic-agentDaemonSet with a controller-runtime basedgalactic-routerthat watches Cosmos BGP CRDs directly.Changes
Removed
cmd/galactic-agent— old agent binary with cobra CLIinternal/agent— gRPC server, agent run loopinternal/bootstrap— BGPProvider CR lifecycleinternal/gobgp— embedded GoBGP server (moved/rewritten underinternal/runtime/gobgp)Added
cmd/galactic-router— router entry point; readsNODE_NAME/ROUTER_ROLEenv varsinternal/controller— controller-runtime reconcilers (BGPRouter, BGPPeer, BGPAdvertisement, BGPPolicy, Secret, Node) with field index registration and status helpersinternal/reconcile— CRD → DesiredRouter translation (node/role checks, secret resolution, IPv6 next-hop)internal/runtime— RouterRuntime interface + RuntimeFactory pattern (GoBGP tenant, FRR fabric stub)internal/model— internal BGP model typesinternal/hash— SHA-256 change detection over DesiredRouter to suppress redundant GoBGP Apply callsUpdated
deploy/galactic-router/) — DaemonSet, RBAC, ServiceAccountgalactic-cniandgalactic-routerbinariesgalactic-routerimage andBGPRouterCRDsKey architectural decisions
BGPRouterreconcile (listenPort=-1, outbound-only). ASN/RouterID changes trigger fullReconfigure.ROUTER_ROLE=tenant→ GoBGP,ROUTER_ROLE=fabric→ FRR stub (Phase 2).BGPAdvertisementCRD; router reconciler picks it up. No in-node gRPC.ErrMissingRouteDistinguisher.Co-Authored-By: Claude noreply@anthropic.com