Introduce IP address pools with hierarchy and synchronous allocation#26
Merged
Conversation
8c1ea81 to
4dee455
Compare
6 tasks
Single-address allocation is handled via IPClaim against a /32 or /128 pool. The dedicated IPAddress and IPAddressClaim resource kinds and all associated registry, client, informer, and lister code are removed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4dee455 to
8037dc2
Compare
Adds three new resource kinds to the IPAM API: IPPool (cluster-scoped) defines an allocatable block of address space. Root pools carry a CIDR directly; child pools carve a sub-block out of a parent pool synchronously at creation time. Visibility controls whether a pool is available within a single project or shared across projects, replacing the previous IPPrefixClass indirection. IPClaim (namespace-scoped) is a workload's request for an address block. Creating a claim returns the allocated CIDR synchronously in the response body. Deleting a claim immediately releases the block back to the pool. IPAllocation (namespace-scoped) is the system-managed record of what was allocated, created and deleted atomically with the claim. It is protected from accidental direct deletion. All allocation transactions use SELECT FOR UPDATE on the parent pool row, providing O(1) locking regardless of pool utilisation and eliminating the conflict window that eventual-consistency approaches carry. Verified: 9/9 e2e suites pass on a live kind cluster; k6 load tests show claim throughput p95 at 8ms (threshold <500ms) and read list p95 at 30ms (threshold <200ms). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5e51df2 to
2d86166
Compare
… feedback - IPPoolStatus.CIDR → AllocatedCIDR (json: allocatedCIDR) across both root and child pools; matches IPClaimStatus.AllocatedCIDR naming convention - IPPool condition type "Ready" → "Allocated", reason "PoolReady" → "AllocationSucceeded"; child pool message includes parent pool name - IPAllocation: remove spec.cidr (system-assigned, belongs in status); remove status.cidr and status.capacity (redundant/wrong scope); add status.allocatedCIDR as the canonical allocated block field - Move ipFamily defaulting for child pools from allocator to registry storage layer (explicit before AllocatePrefix call) - Remove redundant allocation.Strategy fallback from AllocatePrefix; PrepareForCreate guarantees the field is set before storage - Delete stale prefix-* e2e suites (IPPrefixClaim/IPPrefix resource kinds no longer exist); update all e2e fixtures to status.allocatedCIDR - Update cmd/ipam help text and internal/metrics comments to current names All 9 e2e suites pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…QF1008 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… add interface assertions - Rename ipam_prefix_allocations → ipam_cidr_allocations to match the IPPool/IPClaim/IPAllocation API rename; update all SQL references - Consolidate migrations 001 + 002 into a single 001_initial_schema.sql (service is pre-release; no live databases to migrate) - Fix isChildPool always passed as false: add parameter to PrefixAllocator interface; ippool storage passes true, ipclaim storage passes false - Add compile-time interface assertions to ipclaim/storage.go and ipallocation/storage.go (caught by code review) - Add FROM --platform=$BUILDPLATFORM to Dockerfile builder stage so docker buildx cross-compiles arm64 natively instead of via QEMU Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
d8aac81 to
eb9d4a2
Compare
privateip
approved these changes
May 23, 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.
What this does
Introduces three new resource kinds that give operators and workloads a clean, purpose-built model for managing IP address space:
10.0.0.0/8). Pools can be nested: a child pool carves a sub-block out of its parent automatically when created. Visibility controls whether a pool is available only within a project (platform/consumer) or shared across projects (shared).Why it matters
IPPrefixClassindirection is goneVerified
Closes #25.
🤖 Generated with Claude Code