feat(gateway): wire egress control plane and admission webhook - #383
Open
privateip wants to merge 1 commit into
Open
feat(gateway): wire egress control plane and admission webhook#383privateip wants to merge 1 commit into
privateip wants to merge 1 commit into
Conversation
scotwells
approved these changes
Aug 13, 2026
privateip
force-pushed
the
feat/865-egress-phase-b
branch
from
August 14, 2026 01:15
0886b06 to
9c0a1c6
Compare
Phase C of #865, per docs/plans/865-edge-gateway-nat66-egress.md §4-§5. - config.GatewayConfig gains EgressAddress/EgressSID, optional but validated as a pair. - gateway.NewKernelDatapath optionally writes egress_config_table; zero value means no egress on this node. - gateway.DesiredEgressPolicy defined but deliberately not added to EngineState -- routing-only enablement means nothing in Engine/Datapath consumes it yet. - NetworkGatewayReconciler.publishEgressAddress publishes status.EgressAddress and a self-address BGP route, mirroring publishSelfAddress as a separate method since the two fields are independently optional. - webhook.Authorizer narrowed from *NetworkRule to (vpcRef, vpcAttachmentRef string), letting the new NetworkEgressPolicyValidator share it with NetworkRuleValidator instead of duplicating the interface. Wired into cmd/galactic-router alongside the existing validator. - cmd/galactic-gateway CLI flags/config plumbed through to setupGatewayDatapath. Scoping note: the plan's §4.3 also describes a NetworkEgressPolicy watch/reconcile loop mirroring NetworkRule's list-and-assemble pattern. Left out of this phase: it has no well-defined per-policy work until Phase D decides node assignment, and a watch that lists objects and does nothing with them is dead scaffolding, not a real feature.
privateip
force-pushed
the
feat/865-egress-phase-c
branch
from
August 14, 2026 01:16
6d5c25c to
33f95b3
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
Phase C of #865, per docs/plans/865-edge-gateway-nat66-egress.md §4-§5.
Stacked on #381 (Phase B).
config.GatewayConfiggainsEgressAddress/EgressSID, optionalbut validated as a pair.
gateway.NewKernelDatapathoptionally writesegress_config_table;zero value means no egress on this node.
gateway.DesiredEgressPolicydefined but not added toEngineState-- routing-only enablement means nothing in Engine/Datapath consumes
it yet.
NetworkGatewayReconciler.publishEgressAddresspublishesstatus.EgressAddressand a self-address BGP route, kept separatefrom
publishSelfAddresssince the two fields are independentlyoptional.
webhook.Authorizernarrowed from*NetworkRuleto(vpcRef, vpcAttachmentRef string), so the newNetworkEgressPolicyValidatorshares it withNetworkRuleValidatorinstead of duplicating the interface. Wired into
cmd/galactic-routeralongside the existing validator.
cmd/galactic-gatewayCLI flags/config plumbed through tosetupGatewayDatapath.Scoping note
The plan's §4.3 also describes a NetworkEgressPolicy watch/reconcile
loop mirroring NetworkRule's list-and-assemble pattern. Left out here:
it has no well-defined per-policy work until Phase D decides node
assignment, and a watch that lists objects and does nothing with them
is dead scaffolding, not a real feature.
Testing
NewKernelDatapathmismatched-pair/IPv4 rejection, reconciler publish/skip-publish,
webhook create/update/delete/fail-closed plus a test proving one
Authorizerinstance serves both validators.go build ./...,go vet ./...,task lint(0 issues) -- clean.task test:unitunder root: everything this PR touches passes.Two unrelated failures present (
internal/cni/tap,internal/cniroute) are environment artifacts -- confirmedcni/tapfails identically on the unmodified branch, andcniroutepasses cleanly in isolation.🤖 Generated with Claude Code