Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kube play support for CDI resource allocation #25010

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

robertgzr
Copy link
Contributor

We now handle CDI qualified names being passed to resources.limits. The
support for that was already in libpod as of ab7f609
when passed via the devices list. this just hooks the kube yaml parser
up to it.

Additionally we introduce podman.io/device that accepts device paths
as names and is transparently translated to mimick --device. This allows
bringing arbitrary devices into the container via similar, although
incompatible with, k8s mechanics:

resources:
  requests:
    podman.io/device=/dev/kmsg: 1

Fixes: #17833

kube-play now supports CDI strings

Signed-off-by: Robert Günzler [email protected]

We now handle CDI qualified names being passed to resources.limits. The
support for that was already in libpod as of ab7f609
when passed via the devices list. this just hooks the kube yaml parser
up to it.

Additionally we introduce `podman.io/device` that accepts device paths
as names and is transparently translated to mimick --device. This allows
bringing arbitrary devices into the container via similar, although
incompatible with, k8s mechanics:

```yaml
resources:
  requests:
    podman.io/device=/dev/kmsg: 1
```

Fixes: containers#17833

Signed-off-by: Robert Günzler <[email protected]>
@giuseppe
Copy link
Member

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 14, 2025
Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

@rhatdan
Copy link
Member

rhatdan commented Jan 14, 2025

Thanks @robertgzr
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 14, 2025
Copy link
Contributor

openshift-ci bot commented Jan 14, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bachp, giuseppe, robertgzr

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

The pull request process is described here

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

@openshift-merge-bot openshift-merge-bot bot merged commit ec6b035 into containers:main Jan 14, 2025
79 of 80 checks passed
@robertgzr robertgzr deleted the play-cdi branch January 14, 2025 19:46
@robertgzr
Copy link
Contributor Author

@rhatdan @giuseppe where should this be documented? i guess i would look for it somewhere here: https://docs.podman.io/en/latest/markdown/podman-kube-play.1.html

@rhatdan
Copy link
Member

rhatdan commented Jan 14, 2025

Yes document it in the man page in docs/source/markdown/podman-kube-play.1.md.in

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. lgtm Indicates that a PR is ready to be merged. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support device mapping in kube play similar do Kubernetes device plugins
4 participants