Skip to content

Add Probe CRD and controller for fabric health assertions - #510

Merged
felix-kaestner merged 1 commit into
mainfrom
readyness-probe
Sep 3, 2026
Merged

Add Probe CRD and controller for fabric health assertions#510
felix-kaestner merged 1 commit into
mainfrom
readyness-probe

Conversation

@felix-kaestner

@felix-kaestner felix-kaestner commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Introduce the Probe resource in the core API group for asserting operational health of network devices. A Probe runs one-shot or on a cron schedule and supports four assertion types:

  • Ping: ICMP echo from device with optional VRF/source interface
  • MACTableEntry: assert MAC exists in forwarding table
  • RoutePresence: assert IP prefix exists in routing table
  • VTEPPeerConnectivity: assert VTEP peers are up

Add ProbeProvider interface with per-type methods, controller with full reconcile loop (schedule, lock, connect, dispatch, status), reference resolution for Interface/VRF/VLAN with not-found, cross-device, and readiness checks. Add watchers for Device, Interface, VRF, and VLAN ready-state changes.

Add VLANSource and InterfaceSource/VRFSource shared types for name-or-ref resolution with CEL mutual exclusivity validation.

$ kubectl get netprobe
NAME           DEVICE   TYPE                   READY   AGE
mac-entry      leaf1    MACTableEntry          True    4m39s
ping-peer      leaf1    Ping                   True    12m
route-prefix   leaf1    RoutePresence          True    2m47s
vtep-peers     leaf1    VTEPPeerConnectivity   True    49s

@felix-kaestner
felix-kaestner force-pushed the readyness-probe branch 4 times, most recently from b969c1f to 13f741d Compare August 19, 2026 16:40
@felix-kaestner

felix-kaestner commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

Ping Probe

apiVersion: networking.metal.ironcore.dev/v1alpha1
kind: Probe
spec:
  deviceRef:
    name: leaf1
  ping:
    address: 10.0.0.12
    count: 3
    packetSize: 1400
    sourceInterface:
      interfaceRef:
        name: lo0
    timeout: 5s
    vrf:
      name: default
  schedule: '* * * * *'
  type: Ping
status:
  conditions:
  - lastTransitionTime: "2026-08-20T14:48:01Z"
    message: 3/3 packets received, avg 9.66ms
    observedGeneration: 1
    reason: ProbeSuccessful
    status: "True"
    type: Ready
  lastRunTime: "2026-08-20T14:49:00Z"
  nextRunTime: "2026-08-20T14:50:00Z"
  ping:
    avgTime: 9.66ms
    maxTime: 10.723ms
    minTime: 8.319999ms
    received: 3
    sent: 3

MAC Table Entry Probe

apiVersion: networking.metal.ironcore.dev/v1alpha1
kind: Probe
spec:
  deviceRef:
    name: leaf1
  macTableEntry:
    macAddress: "00:00:00:00:00:02"
    vlan:
      id: 10
  type: MACTableEntry
status:
  conditions:
  - lastTransitionTime: "2026-08-20T14:55:00Z"
    message: MAC 00:00:00:00:00:02 found
    observedGeneration: 1
    reason: ProbeSuccessful
    status: "True"
    type: Ready
  lastRunTime: "2026-08-20T14:55:00Z"

Route Prefix Route Probe

apiVersion: networking.metal.ironcore.dev/v1alpha1
kind: Probe
spec:
  deviceRef:
    name: leaf1
  routePresence:
    prefix: 192.168.10.0/24
    vrf:
      name: default
  type: RoutePresence
status:
  conditions:
  - lastTransitionTime: "2026-08-20T14:56:52Z"
    message: prefix 192.168.10.0/24 found
    observedGeneration: 1
    reason: ProbeSuccessful
    status: "True"
    type: Ready
  lastRunTime: "2026-08-20T14:56:52Z"

VTEP Connectivity Probe

apiVersion: networking.metal.ironcore.dev/v1alpha1
kind: Probe
spec:
  deviceRef:
    name: leaf1
  type: VTEPPeerConnectivity
  vtepPeerConnectivity:
    expectedPeers:
    - 10.0.1.12
status:
  conditions:
  - lastTransitionTime: "2026-08-20T14:58:45Z"
    message: 1/1 expected VTEP peers up
    observedGeneration: 1
    reason: ProbeSuccessful
    status: "True"
    type: Ready
  lastRunTime: "2026-08-20T14:58:45Z"

@felix-kaestner
felix-kaestner marked this pull request as ready for review August 20, 2026 15:01
@hardikdr hardikdr added the area/switch-automation Automation processes for network switch management and operations. label Aug 21, 2026
@hardikdr hardikdr added this to Roadmap Aug 21, 2026

@nikatza nikatza left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments but this is a really cool contribution!

Comment thread api/core/v1alpha1/probe_types.go Outdated
Comment thread internal/controller/core/probe_controller.go Outdated
Comment thread internal/controller/core/probe_controller.go
Comment thread internal/controller/core/probe_controller.go
Comment thread internal/controller/core/probe_controller.go Outdated
Comment thread internal/controller/core/probe_controller.go
Comment thread internal/provider/cisco/nxos/provider.go Outdated
Comment thread internal/provider/cisco/nxos/provider.go Outdated
Comment thread internal/provider/cisco/nxos/provider.go
@felix-kaestner
felix-kaestner force-pushed the readyness-probe branch 4 times, most recently from 2ddc353 to 1d956fa Compare August 28, 2026 15:50
Introduce the Probe resource in the core API group for asserting
operational health of network devices. A Probe runs one-shot or on
a cron schedule and supports four assertion types:

- Ping: ICMP echo from device with optional VRF/source interface
- MACTableEntry: assert MAC exists in forwarding table
- RoutePresence: assert IP prefix exists in routing table
- VTEPPeerConnectivity: assert VTEP peers are up

Add ProbeProvider interface with per-type methods, controller with
full reconcile loop (schedule, lock, connect, dispatch, status),
reference resolution for Interface/VRF/VLAN with not-found,
cross-device, and readiness checks. Add watchers for Device,
Interface, VRF, and VLAN ready-state changes.

Add VLANSource and InterfaceSource/VRFSource shared types for
name-or-ref resolution with CEL mutual exclusivity validation.

Signed-off-by: Felix Kästner <felix.kaestner@sap.com>
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/ironcore-dev/network-operator/api/core/v1alpha1 2.52% (-0.15%) 👎
github.com/ironcore-dev/network-operator/cmd 0.00% (ø)
github.com/ironcore-dev/network-operator/internal/controller/core 60.97% (-0.74%) 👎
github.com/ironcore-dev/network-operator/internal/provider 0.00% (ø)
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos 9.48% (-0.38%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ironcore-dev/network-operator/api/core/v1alpha1/groupversion_info.go 0.00% (ø) 2 0 2
github.com/ironcore-dev/network-operator/api/core/v1alpha1/probe_types.go 4.76% (+4.76%) 21 (+21) 1 (+1) 20 (+20) 👍
github.com/ironcore-dev/network-operator/api/core/v1alpha1/ref_types.go 0.00% (ø) 2 0 2
github.com/ironcore-dev/network-operator/api/core/v1alpha1/zz_generated.deepcopy.go 0.00% (ø) 2693 (+187) 0 2693 (+187)
github.com/ironcore-dev/network-operator/cmd/main.go 0.00% (ø) 314 (+3) 0 314 (+3)
github.com/ironcore-dev/network-operator/internal/controller/core/probe_controller.go 49.57% (+49.57%) 351 (+351) 174 (+174) 177 (+177) 🌟
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/provider.go 0.35% (-0.02%) 2273 (+118) 8 2265 (+118) 👎
github.com/ironcore-dev/network-operator/internal/provider/provider.go 0.00% (ø) 42 0 42

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

  • github.com/ironcore-dev/network-operator/internal/controller/core/probe_controller_test.go
  • github.com/ironcore-dev/network-operator/internal/controller/core/suite_test.go

@felix-kaestner
felix-kaestner merged commit 460717e into main Sep 3, 2026
26 checks passed
@felix-kaestner
felix-kaestner deleted the readyness-probe branch September 3, 2026 12:42
@github-project-automation github-project-automation Bot moved this to Done in Roadmap Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/switch-automation Automation processes for network switch management and operations. size/XXL

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants