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 autoallow and entitlements support to CDI devices #5742

Merged
merged 4 commits into from
Feb 18, 2025

Conversation

tonistiigi
Copy link
Member

@tonistiigi tonistiigi commented Feb 14, 2025

Devices can be marked as "automatically allowed" by TOML config or by the CDI spec of specific file via annotation.

Device that is is not "automatically allowed" needs to be allowed by the build request by passing entitlement. For example a Dockerfile may not use a device without use invoking the build permitting it.

--allow device grants access to any device.
--allow device=kind|name grants access to specific device.
--allow device=kind|name,alias=kind|name allows mapping kind to a specific device or one device to another. Alias is the name requested by the build and device is the actual device that is being enabled.

Devices can be marked as "automatically allowed" by TOML config
or by the CDI spec of specific file via annotation.

Device that is is not "automatically allowed" needs to be allowed
by the build request by passing entitlement. For example a Dockerfile
may not use a device without use invoking the build permitting it.

--allow device grants access to any device.
--allow device=kind|name grants access to specific device.
--allow device=kind|name,alias=kind|name allows mapping kind to
a specific device or one device to another. Alias is the name requested
by the build and device is the actual device that is being enabled.

Signed-off-by: Tonis Tiigi <[email protected]>
Copy link
Member

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

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

LGTM

Pushed extra commits to keep auto refresh and add additional tests.

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

Successfully merging this pull request may close these issues.

2 participants