Skip to content

Fix DRA nodeSelector for in-tree driver mode#1298

Open
abyrne55 wants to merge 1 commit into
kubernetes-sigs:mainfrom
abyrne55:fix/dra-intree-nodeselector
Open

Fix DRA nodeSelector for in-tree driver mode#1298
abyrne55 wants to merge 1 commit into
kubernetes-sigs:mainfrom
abyrne55:fix/dra-intree-nodeselector

Conversation

@abyrne55

@abyrne55 abyrne55 commented Jun 29, 2026

Copy link
Copy Markdown

When spec.moduleLoader is nil (in-tree driver mode), the DRA reconciler's nodeSelector includes the KMM ready label, which is never set because no module loading occurs. This prevents the DRA DaemonSet from scheduling on any node.

Fall back to spec.selector instead, matching the existing behavior in the device plugin reconciler.

This PR was written in part with the assistance of generative AI.

Suggested test plan

  • Verify the DRA DaemonSet uses spec.selector as its nodeSelector
  • Deploy KMM with an in-tree Module (moduleLoader: nil) and DRA enabled
  • Verify the DRA DaemonSet pods schedule correctly on matching nodes

@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 29, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: abyrne55 / name: Anthony Byrne (e5a11c2)

@kubernetes-prow

Copy link
Copy Markdown

Welcome @abyrne55!

It looks like this is your first PR to kubernetes-sigs/kernel-module-management 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kernel-module-management has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@kubernetes-prow kubernetes-prow Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 29, 2026
@kubernetes-prow

Copy link
Copy Markdown

Hi @abyrne55. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubernetes-prow kubernetes-prow Bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jun 29, 2026
@abyrne55

Copy link
Copy Markdown
Author

/easycla

@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jun 29, 2026
@netlify

netlify Bot commented Jun 29, 2026

Copy link
Copy Markdown

Deploy Preview for kubernetes-sigs-kmm ready!

Name Link
🔨 Latest commit 4416082
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-kmm/deploys/6a469690662a6c0008319d49
😎 Deploy Preview https://deploy-preview-1298--kubernetes-sigs-kmm.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread internal/controllers/dra_reconciler.go Outdated
Comment thread internal/controllers/dra_reconciler.go Outdated
Comment thread internal/controllers/dra_reconciler.go Outdated
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>
@abyrne55 abyrne55 force-pushed the fix/dra-intree-nodeselector branch from e5a11c2 to 4416082 Compare July 2, 2026 16:49
@kubernetes-prow kubernetes-prow Bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 2, 2026
@yevgeny-shnaidman

Copy link
Copy Markdown
Contributor

/ok-to-test

@kubernetes-prow kubernetes-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 2, 2026
@yevgeny-shnaidman

Copy link
Copy Markdown
Contributor

/lgtm

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 2, 2026
@yevgeny-shnaidman

Copy link
Copy Markdown
Contributor

/approve

@kubernetes-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abyrne55, yevgeny-shnaidman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 2, 2026
@kubernetes-prow

Copy link
Copy Markdown

@abyrne55: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kernel-module-management-unit-tests 4416082 link true /test pull-kernel-module-management-unit-tests

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@yevgeny-shnaidman

Copy link
Copy Markdown
Contributor

@abyrne55 you also need to fix the unit-tests. You can run them locally using "make unit-test"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants