Repository navigation
Configure CDI annotation prefixes in toolkit container when CDI is enabled - #3088
cdesiniotis merged 1 commit into
Conversation
tariq1890
left a comment
There was a problem hiding this comment.
LGTM
Thanks @cdesiniotis !
…abled This aligns the transformToolkitCtrForCDI() method with the transformDevicePluginCtrForCDI() to ensure the same prefixes are configured with both components. Without explicitly configuring the CDI annotation prefixes in the toolkit container, the nvidia-ctk-installer was NOT adding these annotation prefixes to containerd's (or crio's) container_annotations allowlist. As a consequence, any container annotations set by the k8s-device-plugin, in its AllocateResponse, were not making it into the OCI runtime spec for the container. Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
bd2191e to
e616961
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
|
/cherry-pick release-26.7 |
|
🤖 Backport PR created for |
Description
This aligns the transformToolkitCtrForCDI() method with the transformDevicePluginCtrForCDI() to ensure the same prefixes are configured with both components.
Without explicitly configuring the CDI annotation prefixes in the toolkit container, the nvidia-ctk-installer was NOT adding these annotation prefixes to containerd's (or crio's) container_annotations allowlist. As a consequence, any container annotations set by the k8s-device-plugin, in its AllocateResponse, were not making it into the OCI runtime spec for the container.
Checklist
make lint)make validate-generated-assets)make validate-modules)Testing
Ran a sanity test on both k8s + containerd and OpenShift. I verified that #3077 is no longer an issue with this change. This is because the container annotation added by the k8s-device-plugin actually makes its way to the
nvidiaruntime. The problematic volume mount is never processed and the container runs as expected with access to one GPU. As a follow-up, NVIDIA/nvidia-container-toolkit#2146 aims to provide a more robust solution to handle scenarios where CDI is used AND thevolume-mountsstrategy is configured with the toolkit / plugin.