Skip to content

feat: surface NetworkConfig readiness via Ready condition - #138

Open
leo8a wants to merge 1 commit into
ROCm:mainfrom
leo8a:user/leo8a/networkconfig-ready-condition
Open

leo8a wants to merge 1 commit into
ROCm:mainfrom
leo8a:user/leo8a/networkconfig-ready-condition

Conversation

@leo8a

@leo8a leo8a commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Surfaces driver-install and device-plugin readiness of a NetworkConfig directly on the CR, so users (and CI) can watch a single object for completion instead of hunting KMM builder pods and tailing logs.

Previously the Ready condition was set True after any successful reconcile pass — before the out-of-tree driver was built/loaded or the device plugin was running — so oc wait --for=condition=Ready returned too early.

Approach

  • Derive Ready from component status the operator already collects:
    • driver (only when spec.driver.enable): available on all targeted nodes;
    • device plugin: available on all targeted nodes.
  • New reasons DriverNotReady / DevicePluginNotReady with an a/b nodes message; OperatorReady kept for backwards compatibility. Error paths that already set Ready are unchanged.
  • Evaluated in buildNetworkConfigStatus; the reconciler Owns the KMM Module and DaemonSets, so it re-runs on their status changes (no separate status writer exists in this operator, unlike the gpu-operator daemonset watcher).
  • New printer columns: Ready, Reason, and Message (-o wide).

Validation

  • Unit tests in internal/conditions/networkconfig_test.go (table tests per reason, LastTransitionTime kept when status doesn't change).
  • go build, go vet, go test ./internal/conditions/ ./internal/controllers/... pass (tests/e2e excluded; it fails to build on main independently of this change).
  • Deployed on an OpenShift cluster (MI325X + Pollara 400):
    $ oc get networkconfig -n openshift-amd-network -o wide
    NAME          READY   REASON          MESSAGE   AGE
    amd-network   True    OperatorReady             2d20h
    

Signed-off-by: Leonardo Ochoa-Aday lochoa@redhat.com

Ready was set True after any successful reconcile, before the driver
was loaded or the device plugin was running. Derive it from component
status instead:

- driver (when spec.driver.enable): available on all targeted nodes
- device plugin: available on all targeted nodes

Add DriverNotReady / DevicePluginNotReady reasons with an "a/b nodes"
message, and Ready/Reason/Message printer columns.

Signed-off-by: Leonardo Ochoa-Aday <lochoa@redhat.com>
@leo8a

leo8a commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

/cc @yansun1996

This branch has not been deployed

No deployments
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