feat: prefix-preserving dual-stack IPAM for pre-decided addresses - #438
Merged
Conversation
privateip
previously approved these changes
Aug 21, 2026
Adds an "addresses" IPAM path that assigns addresses decided outside galactic-ipam exactly as given: both families, prefix length preserved, one gateway per address. The static_ip path could only express a single IPv6 address, re-masked to /64 with no IPv4, and the pool path re-decides the address the platform already allocated. Reuses the standard CNI "addresses" key already declared on the IPAM struct. Mode selection stays explicit: combining addresses with static_ip or a pool CIDR is a config error. Nothing is allocated and nothing is persisted, so DEL has nothing to release and CHECK nothing to verify — the same shape static_ip already has. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
scotwells
force-pushed
the
feat/static-dualstack-ipam
branch
from
August 21, 2026 01:34
a92f792 to
77cd1b2
Compare
privateip
approved these changes
Aug 21, 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.
Datum's networking layer decides an interface's addresses before the workload is scheduled — an IPv6 endpoint block, optionally an IPv4 address, each with a prefix length that means something. Galactic's CNI cannot currently be told to use them.
static_iptakes a single IPv6 address, forces a/64mask and allocates no IPv4, so an externally decided/96comes out as a/64. The only alternative is the pool path, where galactic re-decides the address and the platform's allocation becomes fiction.This adds an
addressespath that carries pre-decided addresses exactly: any number, both families, prefix length preserved, gateway honoured.{ "type": "galactic-ipam", "addresses": [ {"address": "fd00:10:ff01:0:1::1/96", "gateway": "fd00:10:ff01::1"}, {"address": "172.20.1.7/32", "gateway": "172.20.1.1"} ] }It reuses
ipam.addresses, which was already declared and documented as vestigial, rather than inventing a key.static_ipis unchanged as the legacy single-address path. Combiningaddresseswithstatic_ipor a subnet is a config error rather than a precedence question.Galactic stores nothing on this path
The marker files under the pool allocators exist because galactic has had to be its own IPAM authority: the file is the allocation, and losing it means double-allocating. That authority is what produces #156, #328 and #329.
Nothing is allocated here, so there is nothing to persist. ADD parses and returns, DEL has nothing to release, and CHECK passes — exactly what
static_ipalready does two lines away, for the same reason.galactic-ipamis a delegated plugin and on the tap path galactic never configures a guest address at all, so there is nothing on-node for it to verify either.An earlier revision of this PR added a reservation store. Removing it keeps the new path out of #328's scope rather than extending it.
Related
This is the CNI-side mechanism #197 needs. That issue's problem is two systems each believing they know what is allocated; a plugin that can be handed a decided address, and honour it exactly, is what lets an external authority own the pool. Consumed by the VPC controller in datum-cloud/cloud#6, which renders these addresses into the NAD from what NSO allocated (datum-cloud/network-services-operator#164).
Two existing issues, and how the new path stands against them:
#156 is unchanged — this PR adds a path alongside the pool allocators rather than altering them.
🤖 Generated with Claude Code