Overview
Support a federated IPAM topology where IP pools are delegated from a central hub to edge clusters via Karmada, and each edge cluster runs a local IPAM instance that manages allocations autonomously from its delegated pool.
Motivation
In a multi-cluster deployment, edge clusters need to perform IPAM allocations (pod CIDRs, service CIDRs, etc.) locally — without a round-trip to a central control plane for every allocation. At the same time, the overall address space must be centrally coordinated to prevent overlap across clusters.
The IPPool hierarchy introduced in #25 provides the right building blocks. This issue defines how to compose them with Karmada to achieve federated allocation.
Architecture
Two-tier model
Hub (Karmada control plane)
- Holds root
IPPool objects covering the full address space
- Operators create child
IPPool objects carved from the root, one per edge cluster
- Karmada
PropagationPolicy propagates each cluster's child IPPool to that member cluster
Edge (member cluster)
- Receives its delegated
IPPool via Karmada — this is its local root
- Runs a local IPAM instance that manages
IPClaim and IPAllocation objects against the delegated pool
- May further carve sub-pools (additional child
IPPool objects) for per-node, per-namespace, or per-workload-type allocation
- Operates fully autonomously — no round-trip to the hub per allocation
Non-overlapping allocation is guaranteed by construction: the delegated sub-pools are disjoint by the time Karmada propagates them.
Pool lifecycle
Provisioning a cluster:
- Operator creates a child
IPPool on the hub referencing the root pool and a prefix length
- Hub IPAM allocates the block atomically (
SELECT ... FOR UPDATE on parent pool row) and records status.allocatedCIDR
- Karmada propagates the child
IPPool (including status) to the member cluster
- Local IPAM at the edge treats the propagated pool as its allocation root
Deprovisioning a cluster:
- Operator deletes the child
IPPool on the hub
- Hub IPAM releases the block back to the root pool
- Karmada removes the propagated
IPPool from the member cluster
Further sub-pool delegation at the edge
Edge clusters can carve sub-pools from their delegated root, using the same IPPool hierarchy:
Hub root pool: 10.0.0.0/8
└── cluster-a: 10.1.0.0/16 (propagated via Karmada)
├── node-1: 10.1.1.0/24 (local child pool, per-node)
│ └── IPAllocation: 10.1.1.5 (individual pod IP)
└── node-2: 10.1.2.0/24
No new resource types are required. The existing pool hierarchy handles this natively.
Pool exhaustion
If an edge cluster exhausts its delegated pool, a controller can watch pool utilization (status.capacity.available) and create an additional child IPPool at the hub when capacity drops below a threshold. The new pool is propagated to the edge and made available for further allocation.
IPAM service changes
The IPAM service itself requires no federation-specific changes. It has no awareness of Karmada. The federated topology is an operational composition of existing primitives:
Why status.allocatedCIDR survives propagation
Child pool CIDRs are recorded in status.allocatedCIDR (per the refinements in #25). Karmada must be configured to carry status on propagation for IPPool resources — either via a ResourceInterpreter customization or by propagating the backing IPAllocation object alongside the pool. Without this, the edge IPAM cannot determine the pool's address space.
Karmada configuration (out of scope for this repo)
PropagationPolicy selecting child IPPool objects by cluster label
ResourceInterpreter to carry status.allocatedCIDR through propagation
- Controller watching edge pool utilization and creating additional hub-side child pools when needed
Acceptance criteria
Overview
Support a federated IPAM topology where IP pools are delegated from a central hub to edge clusters via Karmada, and each edge cluster runs a local IPAM instance that manages allocations autonomously from its delegated pool.
Motivation
In a multi-cluster deployment, edge clusters need to perform IPAM allocations (pod CIDRs, service CIDRs, etc.) locally — without a round-trip to a central control plane for every allocation. At the same time, the overall address space must be centrally coordinated to prevent overlap across clusters.
The
IPPoolhierarchy introduced in #25 provides the right building blocks. This issue defines how to compose them with Karmada to achieve federated allocation.Architecture
Two-tier model
Hub (Karmada control plane)
IPPoolobjects covering the full address spaceIPPoolobjects carved from the root, one per edge clusterPropagationPolicypropagates each cluster's childIPPoolto that member clusterEdge (member cluster)
IPPoolvia Karmada — this is its local rootIPClaimandIPAllocationobjects against the delegated poolIPPoolobjects) for per-node, per-namespace, or per-workload-type allocationNon-overlapping allocation is guaranteed by construction: the delegated sub-pools are disjoint by the time Karmada propagates them.
Pool lifecycle
Provisioning a cluster:
IPPoolon the hub referencing the root pool and a prefix lengthSELECT ... FOR UPDATEon parent pool row) and recordsstatus.allocatedCIDRIPPool(including status) to the member clusterDeprovisioning a cluster:
IPPoolon the hubIPPoolfrom the member clusterFurther sub-pool delegation at the edge
Edge clusters can carve sub-pools from their delegated root, using the same
IPPoolhierarchy:No new resource types are required. The existing pool hierarchy handles this natively.
Pool exhaustion
If an edge cluster exhausts its delegated pool, a controller can watch pool utilization (
status.capacity.available) and create an additional childIPPoolat the hub when capacity drops below a threshold. The new pool is propagated to the edge and made available for further allocation.IPAM service changes
The IPAM service itself requires no federation-specific changes. It has no awareness of Karmada. The federated topology is an operational composition of existing primitives:
IPPoolhierarchy (from Introduce IPPool, IPClaim, and IPAllocation to replace IPPrefix/IPPrefixClaim #25) provides the address space structureWhy status.allocatedCIDR survives propagation
Child pool CIDRs are recorded in
status.allocatedCIDR(per the refinements in #25). Karmada must be configured to carry status on propagation forIPPoolresources — either via aResourceInterpretercustomization or by propagating the backingIPAllocationobject alongside the pool. Without this, the edge IPAM cannot determine the pool's address space.Karmada configuration (out of scope for this repo)
PropagationPolicyselecting childIPPoolobjects by cluster labelResourceInterpreterto carrystatus.allocatedCIDRthrough propagationAcceptance criteria
IPPoolcreated at the hub and propagated to an edge cluster (with status) is usable as an allocation root by the local IPAM without modificationIPClaimobjects created against a propagatedIPPoolat the edge produce non-overlappingIPAllocationobjects locallyIPPoolobjects (sub-pools of the propagated root) are created and managed by the local IPAM using the same transaction semantics as hub-side poolsIPPoolreleases its CIDR back to the root pool