Ignore unrelated Node label changes in the NVIDIADriver controller #3305
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3305"
general
weight: 0.35
cdesiniotis
Issue
No separate issue. This supersedes #2683.
Description
The NVIDIADriver controller reconciled all NVIDIADrivers whenever any label on a GPU node changed, and it logged a line for each change. Other tools in the cluster can set many node labels that the operator never reads. Each of those changes still caused a full reconcile, about 30 API requests, and a status update.
With this change, the controller reconciles only when:
nodeSelectorof any NVIDIADriver changes. This includes NVIDIADrivers that do not own the node and NVIDIADrivers that are being deleted, because the node selector conflict check counts both.Examples, for a GPU node (before this change, every one of these started a reconcile):
| Node label change | Reconcile | Reason |
|---|---|---|
| A monitoring agent updates
example.com/heartbeat| No | The operator does not read this label || The node gains or loses its GPU labels, or
nvidia.com/gpu.presentchanges | Yes | The node becomes or stops being a GPU node ||
nvidia.com/gpu-operator.driver.ownerchanges | Yes | The node moves to another NVIDIADriver ||
nvidia.com/gpu.deploy.driverchanges | Yes | The driver DaemonSet selects nodes by this label || An NFD OS or kernel label changes, for example
kernel-version.full| Yes | It sets the node pool and the driver image ||
region=us-east-1is added, and some NVIDIADriver selectsregion| Yes | It can change the node's owner or create a node selector conflict, also for NVIDIADrivers that do not own the node || The same, but that NVIDIADriver is being deleted | Yes | The node selector conflict check still counts it |
A label change on a node without GPU labels does not start a reconcile, before or after this change.
A label added with an empty value counts as a change. If the filter cannot list the NVIDIADrivers, it lets the update through instead of dropping it. A unit test checks that the node pool code reads no label outside the list: changing or removing any other label on a test node does not change the node pools. The node-labeling controller now uses the same
nodeSelectorcheck. The e2e test for node selector conflicts comes from #2683.Checklist
make lint). The full run reports 3 findings incmd/nvidia-validator/main.go, which this PR does not change.make validate-generated-assets)make validate-modules)Testing
Unit tests: 17 cases for the new filter and a test for the label list.
Scale test: a kind cluster with 200 simulated GPU nodes (kwok). A script changed one unrelated label on every node, at 10 changes per node per minute and then at 1 change per node per minute. Each run measured 6 minutes without changes and 6 minutes with changes. The table shows the difference between the two (the cost of the label changes). There was one run per image.
| Driver setup | Changes per node per minute | Measurement | Before | After | Reduction |
|---|---|---|---|---|---|
| NVIDIADriver CRD | 10 | Operator CPU | 385m | 18m | 95% |
| | | API requests per second | 142 | 0.04 | >99.9% |
| | | NVIDIADriver reconciles per second | 4.3 | 0 | 100% |
| | | Memory allocated per second | 272 MB | 8.3 MB | 97% |
| NVIDIADriver CRD | 1 | Operator CPU | 284m | 2.5m | 99% |
| | | API requests per second | 110 | 0.02 | >99.9% |
| | | NVIDIADriver reconciles per second | 3.3 | 0 | 100% |
| | | Memory allocated per second | 206 MB | 0.8 MB | 99.6% |
| ClusterPolicy only | 10 | Operator CPU | 19.7m | 18.5m | 6% (within noise) |
| | | Log lines per second from label changes | 34 | 0 | 100% |
m = millicores (thousandths of one CPU core).