Implement EVPN Fabric loopback reconciliation#353
Open
felix-kaestner wants to merge 10 commits into
Open
Conversation
felix-kaestner
force-pushed
the
fabric-loopbacks
branch
from
May 18, 2026 07:28
45df664 to
d252c82
Compare
|
This PR is stale because it has been open for 45 days with no activity. |
The previously used logo had a low resolution and didn't work well in dark mode and the navigation header. With this change we are replacing it with the standard IronCore logo which is also inline with other projects such as the metal-operator. Signed-off-by: Felix Kästner <felix.kaestner@sap.com>
SVGs are resolution-independent, render natively in browsers, and avoid Git LFS complications for the docs build. Signed-off-by: Felix Kästner <felix.kaestner@sap.com>
Signed-off-by: Felix Kästner <felix.kaestner@sap.com>
Introduces three pool types (IndexPool, IPAddressPool, IPPrefixPool) and a Claim type that references a pool via spec.poolRef. The claim controller allocates the lowest available resource from the referenced pool and writes it back to both the pool status and the claim status. Pools track allocations with ClaimRef+ClaimUID for idempotency, and support Recycle/Retain reclaim policies on claim deletion. All pool types expose an Available condition (HasCapacity/Exhausted). A preferred value can be requested by setting the annotation pool.networking.metal.ironcore.dev/preferred-value on a Claim. The controller will attempt to allocate that exact value; if it is outside the pool's configured ranges or already taken, the claim enters a terminal error state with reason PreferredValueUnavailable. Removing the annotation re-triggers reconciliation and falls back to normal allocation. Signed-off-by: Felix Kästner <felix.kaestner@sap.com>
Documents the pool-based allocation system introduced alongside the IndexPool, IPAddressPool, IPPrefixPool, and Claim types. Covers pool and claim concepts, reclaim policies, the preferred-value annotation, and allocation result fields. Includes light/dark theme diagram images and links to sample manifests in the repository. Signed-off-by: Felix Kästner <felix.kaestner@sap.com>
Replace the embedded Status.Allocations lists on pool types with dedicated Kubernetes objects (Index, IPAddress, IPPrefix) that model allocations as first-class resources following the PV/PVC pattern. Previously, the claim controller reserved values by appending entries to a pool's status and used optimistic locking on the pool status update to prevent races. This coupled allocation state tightly to the pool object and made it impossible to pre-provision or inspect individual allocations. The new design introduces three allocation types — Index, IPAddress, and IPPrefix — each with a spec containing the reserved value, a poolRef back to the owning pool, and an optional claimRef binding it to a Claim. The claim controller now creates allocation objects with deterministic names derived from the pool name and value (e.g. my-pool-64512), using the API server's name-uniqueness guarantee as the concurrency guard: two controllers racing for the same value both attempt Create, exactly one succeeds, the other retries via retry.OnError with a fresh list of used values. Pool types implement a Pool interface with Allocate and ListAllocations methods. Allocate receives the existing allocation objects, builds a used-value set, finds the first free slot, and returns a ready-to-create allocation object. ListAllocations encapsulates the typed List call and returns []Allocation, an interface providing GetClaimRef, SetClaimRef, and GetValue so the claim controller operates generically without type switches. Pool controllers count allocations by listing objects via a shared poolRef field index rather than reading Status.Allocations. The allocation type controllers (Index, IPAddress, IPPrefix) validate each object's value against its pool's ranges/prefixes and set a Valid condition. The claim controller's finalize path applies the pool's reclaim policy: Recycle deletes the allocation object, Retain clears its claimRef so the value persists as reserved but unbound. The AllowBindingAnnotation enables rebinding of allocation objects whose claimRef name matches a Claim but whose UID is stale, such as after a Claim is deleted and recreated with the same name. Signed-off-by: Felix Kästner <felix.kaestner@sap.com>
Reflect the migration from embedded pool status allocations to dedicated allocation objects. Document the new allocation types (Index, IPAddress, IPPrefix), deterministic naming, pre-provisioning with the allow-binding annotation, and the updated claim status fields (status.value, status.allocationRef). Update the flow diagram to match the simplified allocation and reclaim logic. Signed-off-by: Felix Kästner <felix.kaestner@sap.com>
Remove the per-entry IPPrefixPoolPrefix struct and promote prefixLength to IPPrefixPoolSpec. This simplifies the API and eliminates ambiguity when multiple base prefixes are defined. The prefixes list is now []IPPrefix with +listType=set, preventing duplicate entries at admission time. Signed-off-by: Felix Kästner <felix.kaestner@sap.com>
This high-level CRD will take care of creating and managing all low-level resources that are required to build a EVPN VXLAN resource. Its controller implementation is intentionally left empty to a large extend to be extended by future changes. The setup constructs a list of sub-reconciler functions that are called in sequence to build up the full lifecycle of the `Fabric`. Signed-off-by: Felix Kästner <felix.kaestner@sap.com>
Reconcile lo0 (Router-ID), lo1/lo2 (VTEP), and lo100 (anycast RP) loopback Claims and Interfaces for all fabric devices. The Fabric becomes the controller owner of each Claim so the Owns() watch re-enqueues correctly. Interfaces are only created once the Claim is allocated; a guard at the top of Reconcile short-circuits when the provider does not implement InterfaceProvider. Extend provider interface with LoopbackInterfaceName so each driver can return a vendor-specific handle for a given loopback index. Add envtest suite covering Claims, Interfaces, ownership, and the Ready condition. Signed-off-by: Felix Kästner <felix.kaestner@sap.com>
felix-kaestner
force-pushed
the
fabric-crd
branch
from
July 14, 2026 15:40
a73a136 to
b374fc8
Compare
felix-kaestner
force-pushed
the
fabric-loopbacks
branch
from
July 14, 2026 15:40
d252c82 to
41bfb4f
Compare
felix-kaestner
force-pushed
the
fabric-crd
branch
3 times, most recently
from
July 16, 2026 14:24
863564f to
0146260
Compare
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.
Reconcile lo0 (Router-ID), lo1/lo2 (VTEP), and lo100 (anycast RP) loopback Claims and Interfaces for all fabric devices. The Fabric becomes the controller owner of each Claim so the Owns() watch re-enqueues correctly. Interfaces are only created once the Claim is allocated; a guard at the top of Reconcile short-circuits when the provider does not implement InterfaceProvider.
Extend provider interface with LoopbackInterfaceName so each driver can return a vendor-specific handle for a given loopback index.
Add envtest suite covering Claims, Interfaces, ownership, and the Ready condition.