feat: labeler support gpuCluster DRA mode #1877
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 496 lines diff across 6 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.371
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1877"
general
weight: 0.35
tanishagoyal2
Problem Summary
Issue: https://github.com/NVIDIA/NVSentinel/issues/1860
GPU Operator 26.7's GPUCluster (DRA) mode does not deploy GPU Feature Discovery, so the labeler's gpu class, which reads nvidia.com/gpu.count, fails on every node in that mode. The gpu.count.current and gpu.count.expected labels are never written or freeze at their last value, and GPU-loss detection goes blind. In that mode the GPU inventory is published instead as resource.k8s.io/v1 ResourceSlices from driver gpu.nvidia.com.
Decision
Ship two enabled GPU classes writing the same label pair, gpu (GFD label) and gpu-dra (ResourceSlices), so one default configuration serves both operator modes with no per-cluster values. Exactly one succeeds per node:
1. New resourceSliceDriver class setting filters slices to one DRA driver and treats a node with none from that driver as a missing source, so gpu-dra is skipped on ClusterPolicy nodes even when another DRA driver publishes slices.
2. ResourceSlice pools are normalised before evaluation: only the highest spec.pool.generation counts, and the class is skipped until all resourceSliceCount slices of that generation are visible (no double or short counting during driver republish).
3. The resource.k8s.io/v1 informer is created only if the API server serves resourceslices, so Kubernetes 1.33 clusters keep working.
Testing
Step | GPU Operator state | Result
-- | -- | --
1 | GPUCluster (DRA) mode, operator 26.7.0 | gpu-dra wrote 8/8 on all GPU nodes from gpu.nvidia.com slices (8 type=gpu devices each). gpu skipped with evaluation_error. gpu-dra never skipped on a GPU node. A node that had no count labels before gained 8/8.
2 | Switched to ClusterPolicy, operands at 26.3.3 | ClusterPolicy operands, nvidia RuntimeClass and GFD labels returned. gpu wrote 8/8 from nvidia.com/gpu.count; gpu-dra skipped with missing_source.
3 | ClusterPolicy operands upgraded to 26.7.0 (driver 595.91.07, GFD v0.20.0, DCGM 4.6.0) | Driver upgrade rolled through both reachable nodes. Count labels held their last value while operands were down and no false GPU-loss signal was produced. GFD v0.20.0 still writes nvidia.com/gpu.count; gpu wrote 8/8, gpu-dra skipped.
4 | Switched back to GPUCluster (DRA) mode | NFD removed GFD labels on ClusterPolicy deletion, so no stale source remained. gpu-dra resumed writing the moment slices appeared; gpu skipped.
<!-- Brief description of your changes -->
Type of Change
Component(s) Affected
Testing
Checklist
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Added GPU device-count discovery from Kubernetes ResourceSlices produced by the NVIDIA GPU driver.
Added filtering by driver and GPU device type, with grouping by instance type.
GPU count labels can use ResourceSlice data alongside existing sources.
Bug Fixes
ResourceSlice counting now uses only the latest complete pool generation.
Incomplete or unavailable data is skipped without publishing partial counts.
Processing is skipped when the required Kubernetes API is unavailable.
Documentation
Expanded guidance for ResourceSlice configuration, completeness requirements, and generation handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->