Skip to content

Commit 4416082

Browse files
committed
Fix DRA nodeSelector for in-tree driver mode
When spec.moduleLoader is nil (in-tree mode), the DRA reconciler's nodeSelector requires the KMM ready label, which is never set because no module loading occurs. Fall back to spec.selector instead, matching the existing behavior in the device plugin reconciler. Signed-off-by: Anthony Byrne <abyrne@redhat.com>
1 parent f17d16d commit 4416082

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

internal/controllers/dra_reconciler.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -512,10 +512,14 @@ func (dsci *draDaemonSetCreatorImpl) setDRAAsDesired(
512512
utils.GetKernelModuleReadyNodeLabel(mod.Namespace, mod.Name): "",
513513
}
514514

515-
if mod.Spec.ModuleLoader != nil && mod.Spec.ModuleLoader.Container.Version != "" {
516-
versionLabel := utils.GetSchedulePluginVersionLabelName(mod.Namespace, mod.Name)
517-
standardLabels[versionLabel] = mod.Spec.ModuleLoader.Container.Version
518-
nodeSelector[versionLabel] = mod.Spec.ModuleLoader.Container.Version
515+
if mod.Spec.ModuleLoader != nil {
516+
if mod.Spec.ModuleLoader.Container.Version != "" {
517+
versionLabel := utils.GetSchedulePluginVersionLabelName(mod.Namespace, mod.Name)
518+
standardLabels[versionLabel] = mod.Spec.ModuleLoader.Container.Version
519+
nodeSelector[versionLabel] = mod.Spec.ModuleLoader.Container.Version
520+
}
521+
} else {
522+
nodeSelector = mod.Spec.Selector
519523
}
520524

521525
ds.SetLabels(

0 commit comments

Comments
 (0)