Skip to content

fix: Place the gateway and NAT on edge nodes - #747

Merged
privateip merged 2 commits into
mainfrom
fix/issue-718
Oct 6, 2026
Merged

privateip merged 2 commits into
mainfrom
fix/issue-718

Conversation

@privateip

@privateip privateip commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The gateway and NAT manifests refuse any node with a node role label, but egress shards always run on edge nodes and infra already overrides that rule in its galactic-nat and galactic-gateway templates, so the manifests, placement test, docs and lab describe a layout nothing deploys.

Both now require an edge node plus their own opt-in label, and still refuse control-plane nodes. Production is unaffected, since infra sets its own placement.

A running lab needs the edge label on its edge workers before the new NAT manifest applies, or the shards are removed until it is.

Test plan

  • The NAT base schedules on an edge node with the NAT label, and on no other node
  • The gateway base does the same with the gateway label

Fixes #718

🤖 Generated with Claude Code

privateip and others added 2 commits October 6, 2026 10:20
The gateway and NAT bases refused any node carrying a galactic.datumapis.com/node label, to keep them off the node=edge nodes where galactic-vrf runs. Egress shards always run on edge nodes, and infra overrides both affinities to node=edge already, so the repository's manifests, placement test, docs and lab described a layout nothing deploys. The XDP sharing that kept them apart is now the shared dispatcher (#742, #743), and #711 covers the shard SID overlap.

- Both bases require node In [edge] and their own opt-in label, gateway=enabled or nat=enabled, and still refuse control-plane nodes.
- The placement test accepts an edge node with either or both opt-in labels and refuses an edge node with neither, opt-in labels without node=edge, compute, unlabelled and control-plane nodes, and a wrong label value. It fails against the old manifests.
- The node-label doc, AGENTS.md, the gateway and NAT configuration docs and the gateway architecture doc describe the new rule, and the migration steps say to add node=edge before applying the new manifests.
- The lab's edge workers carry node=edge. Kind applies labels only at cluster creation, so a running lab needs them added by hand. Running the gateway in the lab is #699.

Fixes #718

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The metrics reference said the two could share the 9182 default because they never share a node. Both now run on edge nodes. They still do not clash, because galactic-vrf runs in the ingress proxy's pod, which has its own network namespace, while galactic-nat binds 9182 on the node.

Related to #718

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@privateip
privateip marked this pull request as ready for review October 6, 2026 14:26
@privateip
privateip requested a review from a team as a code owner October 6, 2026 14:26
@privateip
privateip enabled auto-merge October 6, 2026 14:27
@privateip

Copy link
Copy Markdown
Collaborator Author

pr-rereviewer confirmed all fixes and the migration claim against both affinities. pr-conventions-reviewer noted landing order dependencies (#746, #749) but the author chose to ready #747 with auto-merge now, deferring rebase if needed. The merge kept #745's dispatcher text with no chain-mode text.

Reviewers ran: pr-adversary (diff, go test ./internal/manifests, stale-claim greps); pr-conventions-reviewer (landing order check, phrase table scan).

Findings applied before this phase: docs/metrics.md reworded to clarify that galactic-vrf's pod has its own network namespace; PR body updated with links to infra's template overrides; rebased onto main after #745 merged with conflicts in AGENTS.md and docs/node-labels.md resolved; migration section corrected to document that old and new manifests' conflicting affinity rules mean a running lab must label its edge workers before applying the new NAT manifest, or the shards are removed until it is.

CI: Unit Tests (root), Unit Tests, Build, and Lint all pass. Image builds in progress. Ruleset requires one code-owner approval; auto-merge waits for that approval on the current head.

Merge method: merge (first allowed by main's ruleset). Auto-merge enabled and will land once code-owner approval is posted.

@privateip
privateip disabled auto-merge October 6, 2026 14:28
@privateip
privateip merged commit 4479181 into main Oct 6, 2026
14 checks passed
@privateip
privateip deleted the fix/issue-718 branch October 6, 2026 14:32
privateip added a commit that referenced this pull request Oct 6, 2026
#747 moved the gateway onto nodes labeled both node=edge and gateway=enabled, so the README's "no node label" placement from this PR's first commit no longer matches the DaemonSet.

Related to #720

Co-Authored-By: Claude Opus 5.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.

Run gateway and NAT on edge nodes

2 participants