gpu-operator icon indicating copy to clipboard operation
gpu-operator copied to clipboard

fix(controller): do not apply driver upgrade annotation when driver is disabled

Open anujdbe opened this issue 2 weeks ago • 2 comments

The applyDriverAutoUpgradeAnnotation() function was applying the nvidia.com/gpu-driver-upgrade-enabled annotation to GPU nodes even when driver.enabled=false. This occurred because the function only checked if driver.upgradePolicy.autoUpgrade was true, without verifying that the driver component itself was enabled.

This fix adds a check for Driver.IsEnabled() before applying the annotation, ensuring it is only set when:

  1. Driver is enabled
  2. Auto-upgrade policy exists and is enabled
  3. Sandbox workloads are disabled

Added unit tests to validate the fix and prevent regression.

Fixes #1277

anujdbe avatar Dec 10 '25 10:12 anujdbe