Repository navigation
Realize NetworkAttachments through EVPN Fabrics - #702
Merged
Merged
Conversation
felix-kaestner
force-pushed
the
networkattachment
branch
from
November 2, 2026 10:17
9eceb48 to
2341e17
Compare
IvoGoman
self-requested a review
November 2, 2026 10:39
IvoGoman
reviewed
Nov 3, 2026
felix-kaestner
force-pushed
the
networkattachment
branch
from
November 3, 2026 16:30
2341e17 to
8d9a907
Compare
felix-kaestner
force-pushed
the
networkattachment
branch
from
November 6, 2026 15:53
8d9a907 to
6d29c43
Compare
IvoGoman
previously approved these changes
Nov 10, 2026
Signed-off-by: Felix Kästner <felix.kaestner@sap.com>
Resolve selected Physical and Aggregate Exact trunk Interfaces through Devices to a single Fabric and record the typed forwarding context. Reject competing attachments requesting the same Device-local VLAN, including attachments belonging to different Networks. Allocate a shared Network-scoped VNI Claim owned by the Fabric and validate its allocation before creating attachment-owned VLANs and bridged EVPNInstances. Set RD to Auto and explicitly derive import and export route targets per RFC 8365 using two-octet iBGP AS numbers. Retain VNI Claims across attachment and Network deletion until their Fabric is removed. Persist Interface/VLAN ownership in status before device realization. Preserve unrelated allowed VLANs, clean stale memberships and owned resources on selector changes, and remove Interface memberships during finalization. Garbage collection handles attachment-owned children. Add indexed dependency watches, switchport VLAN mutation methods, generated API artifacts, and resource-driven controller tests. Signed-off-by: Felix Kästner <felix.kaestner@sap.com>
nikatza
force-pushed
the
networkattachment
branch
from
November 10, 2026 17:21
cceb7b2 to
f1428a5
Compare
Signed-off-by: Pujol <enric.pujol@sap.com>
|
Caution No coverage for base commit 2752ef0 was found, so this report compares against its ancestor 57f9cd7 (1 commit earlier) Merging this branch changes the coverage (4 decrease, 2 increase)
Coverage detailsCompared to commit 57f9cd7 (run #42849655988)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files:
|
IvoGoman
approved these changes
Nov 10, 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.
The EVPN NetworkAttachment controller realizes an overlay
NetworkAttachmentthrough one EVPN
Fabric.Supported topology
A NetworkAttachment must select at least one Interface. Every selected
Interface must:
PhysicalorAggregate;Exactallowed-VLAN mode; omission meansExact; andAll selected Devices must belong to the same Fabric. Stretched attachments
across Fabrics are not supported. Invalid attachments report
Ready=Falseandretain their last known-good realization until the error is corrected.
Two NetworkAttachments for the same Network may not resolve to overlapping
Device sets. Both attachments report an error when they conflict, and existing
realization is preserved.
VNI and EVPN resources
The first attachment for a Network/Fabric pair creates a shared VNI Claim from
Fabric.spec.vniPool. The Fabric owns the Claim, so the allocation survivesperiods with no attachments and is deleted with the Fabric. As an MVP
limitation, deleting the Network can leave the Claim until Fabric deletion.
After allocation, the controller creates one VLAN and one bridged
EVPNInstance per selected Device. The NetworkAttachment owns these resources.
The EVPNInstance uses an automatically generated route distinguisher and an
explicit Route Target derived according to RFC 8365 section 5.1.2.1.
Auto-derivation supports only 2-octet Fabric iBGP ASNs (
1..65535).Existing VLANs or EVPNInstances that are not controlled by the attachment are
reported as conflicts and are never adopted or overwritten.
Interface VLAN membership
Once an attachment requests a VLAN on an Interface, the EVPN controller owns
that Interface/VLAN membership. It preserves unrelated allowed VLANs, retains
the membership while any attachment status still records it, and removes it
when the final demand disappears. This can remove a membership that existed
before the first attachment requested the same VLAN.
NetworkAttachment.status.interfacesrecords the Device, Kubernetes Interfaceresource, and VLAN ID for every realized membership. The controller uses this
inventory to clean up selector changes and deletion. If no explicit allowed
VLANs remain, the field is set to
nil, restoring the Interface API defaultthat allows all VLANs.