← Back to Pull requests

refactor(labeler): move NVIDIA detection to nvidia-labeler #2566

Closed
unknown closed this pull request without merging on Nov 27, 2026 09:46 UTC
View on GitHub
unknown unknown commented on Nov 27, 2026 04:06 UTC
Author

Summary

Implements ADR-077: the labeler splits into two Deployments. Part of #2419.

  • nvidia-labeler (new module and image) writes dcgm.version, driver.installed and the dcgm-bootstrap-completed annotation. It watches the DCGM, driver and GKE driver installer pods, with the same flags, metric names and selectors as before.

  • labeler keeps kata.enabled and the device counts. It no longer watches pods, and its ClusterRole has no pod rules.
  • Each binary writes and removes only its own labels. On an opted-out node (managed: "false"), each removes its own labels.

  • Flags: the labeler still accepts the six moved flags and ignores them with a warning, so a pod spec from an older chart starts.

  • Chart: the labeler chart renders both Deployments from the same Helm values. nvidiaLabeler.enabled and nvidiaLabeler.image are new. The umbrella chart refuses labeler.nvidiaLabeler.enabled: false while the GPU, syslog or NIC health monitor, or metadata-collector, is enabled.

  • Metrics: labeler_events_processed_total and labeler_event_handling_duration_seconds are now reported only by nvidia-labeler. Both report labeler_node_update_failures_total and labeler_node_labels_skipped_managed_total.

  • Build: the module is registered in ko, the Makefile, the CI matrices, the image lists and Tilt. A depguard rule stops labeler from importing nvidia-labeler.

  • Docs: the configuration reference, the DCGM runbook and the other user docs name nvidia-labeler for the DCGM and driver labels.
  • Testing

    Kind cluster

    Three nodes, with fake GPU Operator pods: node A has a driver pod and a DCGM 4.x pod; node B has a GKE driver installer pod and the Kata runtime label. The labeler chart was installed alone.

  • Upgrade from main: the main chart labelled the nodes, then helm upgrade moved to this branch. On every node, managedFields shows each NVIDIA label, the Kata label and the bootstrap annotation last written by the old labeler, before the upgrade. Neither new binary logged a label write.

  • After the upgrade:

  • - Removing the DCGM pod from node A removed only dcgm.version; restoring the pod set 4.x again.
    - managed=false on node A removed dcgm.version and driver.installed (written by nvidia-labeler) and kata.enabled (written by labeler). Removing the opt-out restored all three.
    - kubectl auth can-i list pods: no for the labeler ServiceAccount, yes for nvidia-labeler.
    - Each pod reports the metrics listed above.
  • Rollback to main: helm rollback deleted the nvidia-labeler Deployment, ServiceAccount and RBAC. Every label kept its value, and the old labeler wrote nothing.
  • GPU cluster

    A GKE cluster with 18 GB200 nodes and 3 CPU system nodes. The GPU nodes get driver.installed from the GKE driver installer pods. I rendered the labeler chart from this branch with the release's own values, applied it, and later restored the original objects. A watch recorded the NVSentinel labels on all nodes throughout.

  • Upgrade: both pods synced and finished their startup pass with no label write. Every node stayed in one state: 18 nodes with dcgm.version=4.x, driver.installed=true, kata.enabled=false and the bootstrap annotation, and 3 nodes with kata.enabled=false. Afterwards, the NVSentinel labels and annotations on all 21 nodes matched the snapshot taken before the test.

  • Metrics and RBAC: nvidia-labeler reported 36 processed pod events and no update failures. The labeler reported only its node metrics. The labeler's ClusterRole had no pod rules.

  • Restore to main: the old labeler, before its caches synced, removed driver.installed from 4 GPU nodes, because the GKE installer pod cache was still filling. The DaemonSet controller deleted the metadata-collector and syslog health monitor pods on those nodes. The label came back about 2 seconds later, and the pods were running again within 3 seconds. nvidia-labeler skips events until all its caches have synced, so it does not do this.
  • Umbrella guard

    On a Kind cluster, helm install refuses to turn off nvidia-labeler while a component that selects nodes on its labels is enabled. Both rejected installs left no release and no objects in the namespace.

    $ helm install nvsentinel ./distros/kubernetes/nvsentinel -n nvsentinel --set labeler.nvidiaLabeler.enabled=false
    Error: INSTALLATION FAILED: execution error at (nvsentinel/templates/nvidia-labeler-validation.yaml:32:4): labeler.nvidiaLabeler.enabled is false, but these components are enabled: global.gpuHealthMonitor.enabled, global.syslogHealthMonitor.enabled, global.metadataCollector.enabled. They select nodes on the dcgm.version and driver.installed labels that nvidia-labeler writes. Without nvidia-labeler, nothing removes these labels from an opted-out node, so their pods stay on it. Disable these components too, or enable labeler.nvidiaLabeler.
    
    $ helm install nvsentinel ./distros/kubernetes/nvsentinel -n nvsentinel \
        --set labeler.nvidiaLabeler.enabled=false \
        --set global.gpuHealthMonitor.enabled=false --set global.syslogHealthMonitor.enabled=false \
        --set global.metadataCollector.enabled=false --set global.nicHealthMonitor.enabled=true
    Error: INSTALLATION FAILED: execution error at (nvsentinel/templates/nvidia-labeler-validation.yaml:32:4): labeler.nvidiaLabeler.enabled is false, but these components are enabled: global.nicHealthMonitor.enabled. ...
    

    With --dry-run=server (and podMonitor.enabled=false, because Kind has no PodMonitor CRD), these installs are accepted:

  • nvidia-labeler off, with the GPU, syslog and NIC health monitors and metadata-collector off: only the labeler Deployment renders.

  • global.labeler.enabled=false: the check is skipped, and neither Deployment renders.

  • Default values: both labeler and nvidia-labeler render.
  • Behaviour to note

  • nvidia-labeler skips pod and node events until its informers have synced, with no API call, and reconciles every node after the sync. Before, a pod event during startup could remove driver.installed while another pod cache was still filling.

  • A pod event on an opted-out node now removes the NVIDIA labels. Before, it skipped the node and left removal to the next node event.

  • nvidia-labeler reconciles a node when dcgm.version or driver.installed changes, as well as managed and nvidia.com/gpu.present. If someone sets one of these labels on an opted-out node, nvidia-labeler removes it, so the monitors do not schedule back. The combined labeler did this only as a side effect: with device counts on, it reconciled on almost any label change. Its own writes cause one more reconcile, which finds nothing to change and makes no API call.
  • Type of Change


  • 🐛 Bug fix

  • ✨ New feature

  • 💥 Breaking change

  • 📚 Documentation

  • 🔧 Refactoring

  • 🔨 Build/CI
  • Component(s) Affected


  • Health Monitor

  • Core Service

  • Fault Management

  • Janitor

  • Deployment/Config

  • API/Interface

  • Preflight

  • Plugins

  • Documentation/CI

  • New Component

  • Multiple Components

  • Other
  • Checklist


  • Self-review completed

  • Documentation updated (if needed)

  • Ready for review
  • <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    New Features
    Added an NVIDIA labeler deployment, enabled by default, to detect DCGM versions and driver status and apply corresponding node labels.
    Disabling it is blocked while enabled components depend on its labels.
    Changes
    The existing labeler now handles Kata detection and device-count labels; it no longer watches pods or manages NVIDIA detection labels.
    Each labeler removes its own detection labels from nodes opted out of management.
    Pod-event metrics are reported by the NVIDIA labeler; device-count metrics remain with the existing labeler.
    Documentation
    * Updated configuration, metrics, deployment, and operational guides to clarify each labeler’s responsibilities.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: lalitadithya Review duration: 339m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.52) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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 #2566"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 22.5% · Safe to merge
    22.5%