Skip to content

feat: Assign an egress shard's SID in spec - #25

Merged
privateip merged 1 commit into
mainfrom
feat/egress-shard-sid-spec
Sep 23, 2026
Merged

privateip merged 1 commit into
mainfrom
feat/egress-shard-sid-spec

Conversation

@privateip

@privateip privateip commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

#23 moves an egress shard's addresses into spec but leaves the SID in status, so each shard node still needs a hand-written DaemonSet patch to set it. datum-cloud/galactic#581 makes galactic-nat program its whole identity from its own EgressShard, and it needs the SID in spec to do that.

The SID is still chosen by an operator. This changes where that choice is written, not who makes it. It is write-once like the addresses, because every established flow's reply is re-encapsulated from it.

API

spec:
  targetRef:
    kind: Node
    name: dfw-worker
  shardSID: "2001:db8:ff01:2001:e001::"   # new: write-once, IPv6 only
  shardAddressIPv6: "2001:db8:9966:1::1"
status:
  shardSID: "2001:db8:ff01:2001:e001::"   # now: what the datapath is programmed with

Test plan

  • go test ./api/...
  • task lint
  • Chainsaw egress-shard-address-immutability on a kind cluster: a changed SID, an unassigned SID, and an IPv4 SID are each rejected, and the first assignment is accepted

Related to datum-cloud/galactic#581

🤖 Generated with Claude Code

@privateip
privateip requested a review from a team as a code owner September 23, 2026 21:17
scotwells
scotwells previously approved these changes Sep 23, 2026
Base automatically changed from feat/egress-shard-address-spec to main September 23, 2026 21:21
@privateip
privateip dismissed scotwells’s stale review September 23, 2026 21:21

The base branch was changed.

A shard's SID still arrives as process configuration, so every shard node needs a hand-written patch on the galactic-nat DaemonSet even after its addresses moved into spec. That patch is the per-node configuration datum-cloud/galactic#581 removes: the shard's process should program its whole identity from its own EgressShard, and it cannot while the SID has nowhere in spec to live.

Add spec.shardSID on the same terms as the addresses. It is write-once for the same reason they are: every established flow's reply is re-encapsulated from this SID, so changing it strands them. It stays operator-chosen until the addressing service hands out identifiers of this kind, which is what the status-only position was waiting for; moving it now changes who writes it, not who chooses it.

status.shardSID keeps its key and becomes what the datapath is programmed with, matching the address fields.

Key changes:
- Add spec.shardSID, optional, IPv6-only, write-once, and unable to be unassigned once assigned
- Re-specify status.shardSID as the SID the datapath is programmed with
- Cover the new key in the JSON and omitempty unit tests
- Extend the chainsaw scenario with a changed SID, an unassigned SID, and an IPv4 SID, each rejected

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@privateip
privateip force-pushed the feat/egress-shard-sid-spec branch from 335a64e to 4bc9f18 Compare September 23, 2026 21:22
@privateip
privateip requested a review from scotwells September 23, 2026 21:22
@privateip
privateip merged commit 1ed44c8 into main Sep 23, 2026
6 checks passed
@privateip
privateip deleted the feat/egress-shard-sid-spec branch September 23, 2026 21:51
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.

2 participants