Skip to content

Enable DRA device metadata (KEP-5304)#164

Draft
carlory wants to merge 2 commits intokubernetes-sigs:mainfrom
carlory:kep-5304-enable-device-metadata
Draft

Enable DRA device metadata (KEP-5304)#164
carlory wants to merge 2 commits intokubernetes-sigs:mainfrom
carlory:kep-5304-enable-device-metadata

Conversation

@carlory
Copy link
Copy Markdown
Member

@carlory carlory commented Apr 20, 2026

Summary

Add support for KEP-5304 in-container device metadata by passing device attributes from the allocatable device pool through to prepared devices.

  • New --enable-device-metadata CLI flag and ENABLE_DEVICE_METADATA env var
  • New kubeletPlugin.enableDeviceMetadata Helm chart value
  • Device attributes from the driver's allocatable pool are propagated as metadata on prepared devices
  • Bumps Go to 1.26.0 and all k8s.io dependencies to v0.36.0-rc.1

/cc @alaypatel07
I add you as co-author. If you want to submit a PR, feel free to close this PR.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: carlory
Once this PR has been reviewed and has the lgtm label, please assign bart0sh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Apr 20, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot requested review from bart0sh and klueska April 20, 2026 07:22
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 20, 2026
@carlory carlory force-pushed the kep-5304-enable-device-metadata branch from 3e77fa1 to c424108 Compare April 20, 2026 07:27
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 20, 2026
@carlory carlory force-pushed the kep-5304-enable-device-metadata branch 2 times, most recently from 81c79eb to 7d6235f Compare April 20, 2026 07:42
@k8s-ci-robot k8s-ci-robot 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 Apr 20, 2026
@carlory carlory force-pushed the kep-5304-enable-device-metadata branch from 7d6235f to 77ab291 Compare April 20, 2026 07:47
@pohly pohly moved this from 🆕 New to 👀 In review in Dynamic Resource Allocation Apr 20, 2026
Comment thread go.mod Outdated
k8s.io/client-go v0.35.4
k8s.io/component-base v0.35.4
k8s.io/dynamic-resource-allocation v0.35.4
k8s.io/api v0.36.0-rc.1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a draft of the changes to bump to 1.36 here but haven't opened a PR yet: main...nojnhuh:dra-example-driver:k8s-1.36

I'm ok if we want to do that in this PR, but can we at least make those changes a separate commit here? There are also some other places that need to be updated here that you can check against my branch.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v1.36 will be released in two days, once it is released, I will update this PR.

affinity: {}
kubeletRegistrarDirectoryPath: /var/lib/kubelet/plugins_registry
kubeletPluginsDirectoryPath: /var/lib/kubelet/plugins
enableDeviceMetadata: false
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we update the e2e tests to enable and exercise this flag?

#153 refactors all of the e2e logic but I think that will merge soon, so you may want to hold off on that until that merges.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 22, 2026
carlory and others added 2 commits April 28, 2026 10:08
Co-authored-by: alaypatel07 <alayp@nvidia.com>
Signed-off-by: carlory <baofa.fan@daocloud.io>
…ce attributes from the allocatable device pool through to prepared devices. This includes a new --enable-device-metadata flag and corresponding Helm chart value.

Signed-off-by: carlory <baofa.fan@daocloud.io>
@carlory carlory force-pushed the kep-5304-enable-device-metadata branch from 77ab291 to b032b4e Compare April 28, 2026 05:59
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 28, 2026
Comment thread demo/scripts/common.sh
# The kubernetes tag to build the kind cluster from
# From ${KIND_K8S_REPO}/tags
: ${KIND_K8S_TAG:="v1.35.0"}
: ${KIND_K8S_TAG:="v1.36.0"}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v1.36.0 is unavailable.

~ » skopeo list-tags docker://docker.io/kindest/node | jq '.Tags[-1]'                                          kiki@zhanxis-MacBook-Pro
"v1.35.1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could set BUILD_KIND_IMAGE based on whether $KIND_IMAGE exists instead of a static true/false.

# At present, kind has a new enough node image that we don't need to build our
# own. This won't always be true and we may need to set the variable below to
# 'true' from time to time as things change.
: ${BUILD_KIND_IMAGE:="false"}

I've noticed resource constraint issues with building the kind image from source in CI. Then we could refactor demo/scripts/build-kind-image.sh to allow building the image from release artifacts. We would need a way to pass --type release <version> here instead of a file path to the cloned repo:

${KIND} build node-image --image "${KIND_IMAGE}" "${KIND_K8S_DIR}"

A generic variable like KIND_BUILD_NODE_IMAGE_ARGS is probably good enough to handle a variety of use cases.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying this out in #188.

@carlory carlory marked this pull request as draft April 28, 2026 06:33
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 28, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

PR needs rebase.

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.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants