Skip to content

Create and reconcile ServerNetworkConfig alongside BMC#145

Open
xkonni wants to merge 1 commit into
mainfrom
feat/networkCheck
Open

Create and reconcile ServerNetworkConfig alongside BMC#145
xkonni wants to merge 1 commit into
mainfrom
feat/networkCheck

Conversation

@xkonni

@xkonni xkonni commented Apr 2, 2026

Copy link
Copy Markdown

metal-operator now gates the Discovery→Available transition on the presence of a ServerNetworkConfig object per server. This change makes argora responsible for creating that object when a BMC is first provisioned and keeping its spec.interfaces up-to-date on every subsequent reconcile.

Changes:

  • Add go.mod replace directive pointing at the local metal-operator fork that contains the new ServerNetworkConfig type (upstream version TBD)
  • Add Namespace field to IronCoreReconciler with a corresponding --ironcore-namespace CLI flag; ServerNetworkConfig is namespace-scoped unlike BMC/BMCSecret which are cluster-scoped
  • Add RBAC marker for servernetworkconfigs (get/list/watch/create/update/patch)
  • Add buildExpectedInterfaces: queries NetBox DCIM for the device's interfaces and filters out LAG, mgmt-only, and unconnected entries
  • Add createServerNetworkConfig: called once after a new BMC is created
  • Add updateServerNetworkConfig: called on every reconcile when the BMC already exists, patches spec.interfaces and labels to reflect the current NetBox state; falls back to create if the object is missing

Important

metal-operator now gates the Discovery→Available transition on the
presence of a ServerNetworkConfig object per server. This change makes
argora responsible for creating that object when a BMC is first
provisioned and keeping its spec.interfaces up-to-date on every
subsequent reconcile.

Changes:
- Add go.mod replace directive pointing at the local metal-operator fork
  that contains the new ServerNetworkConfig type (upstream version TBD)
- Add Namespace field to IronCoreReconciler with a corresponding
  --ironcore-namespace CLI flag; ServerNetworkConfig is namespace-scoped
  unlike BMC/BMCSecret which are cluster-scoped
- Add RBAC marker for servernetworkconfigs (get/list/watch/create/update/patch)
- Add buildExpectedInterfaces: queries NetBox DCIM for the device's
  interfaces and filters out LAG, mgmt-only, and unconnected entries
- Add createServerNetworkConfig: called once after a new BMC is created
- Add updateServerNetworkConfig: called on every reconcile when the BMC
  already exists, patches spec.interfaces and labels to reflect the
  current NetBox state; falls back to create if the object is missing
@xkonni

xkonni commented Jun 16, 2026

Copy link
Copy Markdown
Author

Scope update — supersedes original description

The ServerNetworkConfig CRD and ServerMetadata approach are superseded. This PR should be reworked to target the new ServerReadinessCheck CRD in metal-maintenance-operator (ironcore-dev/metal-maintenance-operator#81).

Updated scope

Argora's role is as a spec writer only — it populates spec.network on ServerReadinessCheck from NetBox data. The mmo controller owns evaluation and condition writing.

Configuration

New flag: --readiness-checks=network (comma-separated, empty by default)

  • Controls which spec.* fields argora populates on ServerReadinessCheck
  • Off by default — opt-in per environment
  • Extensible: if argora gains NetBox data for other check types (disk, bios, etc.), just add them as values — no new flags needed

Changes needed vs. original PR

  • Target ServerReadinessCheck instead of ServerNetworkConfig
  • Write to spec.network.interfaces (MAC-keyed ExpectedInterface structs per mmo#81 schema)
  • Add --readiness-checks flag
  • Drop go.mod replace directive — upstream types will be in a released metal-operator version
  • Drop ServerMetadata fallback reference — that path is closed

The NetBox querying logic (buildExpectedInterfaces) is largely reusable, just needs remapping to the new struct shape.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant