Skip to content

Federated IPAM: Karmada-based pool delegation to edge clusters #27

@scotwells

Description

@scotwells

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:

  1. Operator creates a child IPPool on the hub referencing the root pool and a prefix length
  2. Hub IPAM allocates the block atomically (SELECT ... FOR UPDATE on parent pool row) and records status.allocatedCIDR
  3. Karmada propagates the child IPPool (including status) to the member cluster
  4. Local IPAM at the edge treats the propagated pool as its allocation root

Deprovisioning a cluster:

  1. Operator deletes the child IPPool on the hub
  2. Hub IPAM releases the block back to the root pool
  3. 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

  • A child IPPool created at the hub and propagated to an edge cluster (with status) is usable as an allocation root by the local IPAM without modification
  • IPClaim objects created against a propagated IPPool at the edge produce non-overlapping IPAllocation objects locally
  • Edge child IPPool objects (sub-pools of the propagated root) are created and managed by the local IPAM using the same transaction semantics as hub-side pools
  • Deleting the hub-side child IPPool releases its CIDR back to the root pool
  • No Karmada-specific logic exists in the IPAM service itself

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions