Repository navigation
feat(gpu-operator): add container variant for preinstalled host driver - #2766
Conversation
📝 WalkthroughWalkthroughAdds a new ChangesContainer Variant for Pre-Installed NVIDIA Drivers
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
90a826f to
dcec3cb
Compare
dcec3cb to
7c8a254
Compare
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request adds a 'container' variant to the Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new container variant for the gpu-operator package, designed for running containerized GPU workloads on hosts that already have the NVIDIA driver and nvidia-container-toolkit pre-installed. The changes include adding the values-container.yaml configuration, updating the platform sources, expanding the documentation, and adding BATS tests to verify the configuration of the new variant. There are no review comments, and I have no feedback to provide.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/system/gpu-operator/values-container.yaml (1)
8-15: ⚡ Quick winConsider setting
defaultWorkload: containerexplicitly for defense in depth.The comment explains that no override is needed because upstream defaults to
'container'whensandboxWorkloadsis disabled. While this is correct and intentional, explicitly settingdefaultWorkload: containerwould defend against upstream behavior changes (e.g., if NVIDIA changes the default in a future chart version).The test at
hack/check-gpu-operator-variants.bats:120validates this assumption, so a regression would be caught, but setting it explicitly would prevent the breakage in the first place.🛡️ Proposed defensive addition
gpu-operator: sandboxWorkloads: - # Default upstream workload on a node without the per-node - # 'nvidia.com/gpu.workload.config' label is 'container' when - # sandboxWorkloads is off — which is exactly what this variant - # wants. No defaultWorkload override needed; the counterpart - # overrides in values-passthrough.yaml / values-vgpu.yaml exist - # only because those variants flip sandboxWorkloads to true. enabled: false + # Explicitly pin to 'container' for defense in depth, even though + # it matches the upstream default when sandboxWorkloads is off. + # Protects against upstream changing the fallback behavior. + defaultWorkload: container🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/system/gpu-operator/values-container.yaml` around lines 8 - 15, Add an explicit defaultWorkload: container to the sandboxWorkloads block in values-container.yaml to harden against upstream default changes; locate the sandboxWorkloads: enabled: false stanza and add the defaultWorkload: container key alongside enabled so the GPU operator variant explicitly enforces container workload behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/system/gpu-operator/values-container.yaml`:
- Around line 8-15: Add an explicit defaultWorkload: container to the
sandboxWorkloads block in values-container.yaml to harden against upstream
default changes; locate the sandboxWorkloads: enabled: false stanza and add the
defaultWorkload: container key alongside enabled so the GPU operator variant
explicitly enforces container workload behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4205e2d7-52cc-49d4-a30e-fc250e091250
📒 Files selected for processing (6)
docs/gpu-vgpu.mdhack/check-gpu-operator-variants.batspackages/core/platform/sources/gpu-operator.yamlpackages/system/gpu-operator/examples/README.mdpackages/system/gpu-operator/values-container.yamlpackages/system/gpu-operator/values.yaml
Document the new container variant of cozystack.gpu-operator, paired with cozystack/cozystack#2766. Covers the apt-installed-driver-and-toolkit Linux shape that the variant targets: when to pick it over the passthrough and vGPU variants, prerequisites (host driver + host nvidia-container-toolkit, validated via nvidia-smi over kubectl debug), the operator-validator host-driver auto-detect path (/host/usr/bin/nvidia-smi), Talos caveat with a pointer to the values-native-talos.yaml reference, install steps, a sample CUDA pod for verification, the variant comparison matrix, and a cross-reference to the HAMi sharing guide for tenant Kubernetes clusters. Lands under operations/ — symmetric with virtualization/gpu.md (VM passthrough on management cluster) and kubernetes/gpu-sharing.md (HAMi in tenant Kubernetes addons). Assisted-By: Claude <[email protected]> Signed-off-by: Aleksei Sviridkin <[email protected]>
7c8a254 to
b9243a0
Compare
Document the new container variant of cozystack.gpu-operator, paired with cozystack/cozystack#2766. Covers the apt-installed-driver-and-toolkit Linux shape that the variant targets: when to pick it over the passthrough and vGPU variants, prerequisites (host driver + host nvidia-container-toolkit, validated via nvidia-smi over kubectl debug), the operator-validator host-driver auto-detect path (/host/usr/bin/nvidia-smi), Talos caveat with a pointer to the values-native-talos.yaml reference, install steps, a sample CUDA pod for verification, the variant comparison matrix, and a cross-reference to the HAMi sharing guide for tenant Kubernetes clusters. Lands under operations/ — symmetric with virtualization/gpu.md (VM passthrough on management cluster) and kubernetes/gpu-sharing.md (HAMi in tenant Kubernetes addons). Assisted-By: Claude <[email protected]> Signed-off-by: Aleksei Sviridkin <[email protected]>
myasnikovdaniil
left a comment
There was a problem hiding this comment.
Summary
This adds a third gpu-operator variant, container, for hosts that already ship the NVIDIA driver and nvidia-container-toolkit (the apt-installed Ubuntu/Debian shape), where neither default (VFIO passthrough, which unbinds the host driver) nor vgpu (proprietary SR-IOV stack) can serve plain CUDA pods. It maps onto upstream's standard container-workload mode (sandboxWorkloads.enabled=false + devicePlugin.enabled=true) with driver/toolkit/vfioManager off so the operator doesn't fight the host install — essentially a first-class promotion of the proven examples/values-native-talos.yaml config minus the Talos driverInstallDir workaround. The change is additive and opt-in (variant: container), with a new values overlay, a mirrored PackageSource entry, three new bats regression tests, and docs updates. Structure and consistency with the existing two variants are correct, and nothing here can regress current default/vgpu users.
The substantive concerns are narrow: (1) the variant inherits cdi.enabled=true from the upstream chart while disabling the toolkit that normally services CDI — the most likely way it doesn't actually work on the target shape; (2) one values comment states a wrong upstream default; and (3) the docs understate the host prerequisites (an apt install does not configure containerd). The bats tests and the PackageSource/bundle wiring are sound. Requesting changes for items 1–3 plus a real-node smoke test before merge — details inline and in the verification list below.
NEEDS ENGINEER VERIFICATION
The gating logic lives in the operator/validator images, not the chart, and the PR states verification was helm template + unit tests only:
- End-to-end on the target shape. Deploy
variant: containeron a real Ubuntu node (apt driver + toolkit) and confirm a CUDA pod schedules and runsnvidia-smi:kubectl -n cozy-gpu-operator get pods -o wide kubectl -n cozy-gpu-operator logs ds/nvidia-operator-validator -c driver-validation kubectl -n cozy-gpu-operator logs ds/nvidia-operator-validator -c toolkit-validation kubectl get node <gpu-node> -o jsonpath='{.status.allocatable.nvidia\.com/gpu}' - CDI behavior with an unmanaged toolkit (see inline). Confirm what the operator does with the rendered
cdi.enabled: truewhentoolkit.enabled=false:kubectl get clusterpolicy cluster-policy -o yaml | grep -A3 'cdi:' ls /var/run/cdi /etc/cdi 2>/dev/null # on the host - Validator host-driver auto-detect claim.
examples/README.mdasserts the validator probes/host/usr/bin/nvidia-smiwhendriver.enabled=false, while the defaultdriverInstallDiris/run/nvidia/driver. Confirm via thedriver-validationinit-container logs or the v26.3.1 validator source.
Recommendation: request changes — items 1–3 are quick edits; item 1's inline + the smoke test are what stand between "renders correctly" and "works on the host shape it targets".
| # binding must not happen. Upstream defaults this to off when | ||
| # sandboxWorkloads is disabled, but the explicit pin protects | ||
| # against an upstream default flip. | ||
| enabled: false |
There was a problem hiding this comment.
The comment states "Upstream defaults this to off when sandboxWorkloads is disabled" — that's not accurate at the chart level. The upstream v26.3.1 default is vfioManager.enabled: true unconditionally (charts/gpu-operator/values.yaml:469-470), and the template renders it verbatim with no sandboxWorkloads gating (charts/gpu-operator/templates/clusterpolicy.yaml:342-343). The repo's own passthrough bats test even asserts the rendered value is true with no override.
What's actually true: vfio-manager only schedules onto nodes labeled nvidia.com/gpu.workload.config=vm-passthrough, and with sandboxWorkloads.enabled=false no node ever gets a sandbox assignment — so the DaemonSet stays at zero pods, it isn't "defaulted off." The pin is correct and worth keeping; please fix the rationale so it doesn't mislead the next chart-bump audit:
vfioManager:
# Defensive: vfioManager unbinds the host driver to bind vfio-pci.
# Upstream still renders vfioManager.enabled=true into the
# ClusterPolicy; it only stays at zero pods because no node carries
# a sandbox workload assignment when sandboxWorkloads is off. Pin it
# off so the rendered policy matches intent regardless of upstream
# scheduling changes.
enabled: false| enabled: false | ||
| devicePlugin: | ||
| # Publish nvidia.com/gpu to the kubelet so pods can request GPUs. | ||
| enabled: true |
There was a problem hiding this comment.
Functional risk — please verify or pin. The upstream v26.3.1 chart defaults cdi.enabled: true (charts/gpu-operator/values.yaml:15-16), and neither the base values.yaml nor this overlay touches it, so this variant's ClusterPolicy renders with CDI on. In operator-managed deployments, CDI spec generation and runtime wiring are done by the toolkit container — which this variant disables. An apt-installed nvidia-container-toolkit does not generate CDI specs on its own (nvidia-ctk cdi generate is a manual step). So cdi.enabled=true + toolkit.enabled=false on exactly the target host shape may silently degrade or break device-plugin allocation.
Note the Talos example "worked" with the same inherited value only because the Talos extension wires its own hooks — that result doesn't transfer to the apt shape. Either pin it off:
cdi:
# Upstream defaults cdi.enabled=true, but CDI spec generation is
# serviced by the operator-managed toolkit, which this variant
# disables. The apt host toolkit uses the classic
# nvidia-container-runtime hook path, not CDI. Pin off so device
# allocation matches the host wiring.
enabled: false…or, if you have evidence the operator ignores cdi.enabled when the toolkit is unmanaged, put that in the comment instead. It needs to be one or the other — right now it's an untested inheritance.
|
|
||
| - **`default`** — passthrough mode (`vfio-pci`). Whole GPU goes to a single VM. Talos is supported here; the kernel module is the open-source `vfio-pci`, no proprietary driver is needed on the host. | ||
| - **`vgpu`** — SR-IOV vGPU mode. One physical GPU is sliced into multiple VFs, each VF bound to a vGPU profile that the guest sees as its own GPU. | ||
| - **`container`** — containerized GPU workloads (CUDA pods, ML training) via the standard NVIDIA device plugin on hosts that already provide both the NVIDIA driver and `nvidia-container-toolkit` (the typical apt-installed Ubuntu/Debian shape). Sandbox workloads are off, `devicePlugin` is on, `driver` / `toolkit` / `vfioManager` are off so that the operator does not fight the host install. Orthogonal to the two VM variants — it does not pass GPUs to KubeVirt VMs. |
There was a problem hiding this comment.
Prerequisites are understated here (and the same wording in the PR body). apt install nvidia-container-toolkit installs binaries only — it does not configure containerd. For the device plugin to get NVML access and for the operator-validator's toolkit check to pass, the host must additionally have run nvidia-ctk runtime configure --runtime=containerd (+ containerd restart) and either set nvidia as the default runtime or expose it via a RuntimeClass. The operator's toolkit component normally does this wiring, and it's disabled in this variant. Suggest making it explicit:
- **`container`** — ... Requires the host to provide the NVIDIA driver,
`nvidia-container-toolkit`, **and** a containerd configured with the
`nvidia` runtime (`nvidia-ctk runtime configure --runtime=containerd`,
set as default or via a RuntimeClass). The operator's toolkit
component — which normally does this wiring — is disabled here.Related: the PR body's claim that the operator toolkit "would overwrite … the CDI hooks the host package wired up" repeats a misconception — the apt package wires no CDI hooks (see the cdi.enabled thread on values-container.yaml).
| Talos. | ||
| The files in this directory are **not** templates. They are reference artifacts that document one working configuration for running GPU workloads directly in pods on a Talos-based Cozystack cluster, together with the DCGM metrics needed by the `gpu/gpu-performance` Grafana dashboard. | ||
|
|
||
| For non-Talos Linux hosts that already provide the NVIDIA driver and `nvidia-container-toolkit` via the distro package manager (the typical apt-installed Ubuntu/Debian shape), pick the first-class `container` variant instead — `variant: container` in your Package CR is enough and no `hostPaths.driverInstallDir` override is needed because the operator-validator auto-detects the host driver at `/host/usr/bin/nvidia-smi`. The files here remain the right starting point on Talos, where the extension installs `nvidia-smi` at `/usr/local/bin/` and the auto-detect path misses it. |
There was a problem hiding this comment.
Two things to verify/qualify in this paragraph:
- "
variant: container... is enough" — same gap as the vGPU doc: it's enough only if the host's containerd is already configured for thenvidiaruntime. An apt toolkit install alone is not sufficient. Worth a one-line caveat here too. - Auto-detect path claim — "the operator-validator auto-detects the host driver at
/host/usr/bin/nvidia-smi" is an assertion about validator-internal behavior that isn't visible in this repo; the chart's defaulthostPaths.driverInstallDiris/run/nvidia/driver. Please confirm against the v26.3.1 validator (or thedriver-validationinit-container logs on a real node) before stating it as fact, since the whole "no override needed on Ubuntu" claim rests on it.
The two existing variants assume the host has neither the NVIDIA driver
nor the container toolkit: default unbinds the host driver to bind
vfio-pci for KubeVirt VMs, vgpu requires the proprietary vGPU host
driver and a license server. Neither path produces a working setup on a
node that already ships the driver and nvidia-container-toolkit via the
distro package manager — the most common shape of a Linux GPU node.
The new container variant surfaces the third architectural mode that
upstream NVIDIA gpu-operator already supports: sandboxWorkloads
disabled, devicePlugin enabled, with every component that would
conflict with the host install switched off.
- driver.enabled=false use the host driver
- toolkit.enabled=false host already has nvidia-container-toolkit;
enabling overwrites the containerd
config.toml the host configured via
nvidia-ctk runtime configure
- devicePlugin.enabled=true publish nvidia.com/gpu to the kubelet
- vfioManager.enabled=false do not unbind the host driver
- cdi.enabled=false CDI spec generation is serviced by the
disabled toolkit; an apt host uses the
legacy nvidia-container-runtime hook, so
pin off to match the host runtime wiring
- sandboxWorkloads.enabled=false regular pod workloads, not VMs
Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
b9243a0 to
9352d3e
Compare
Document the new container variant of cozystack.gpu-operator, paired with cozystack/cozystack#2766. Covers the apt-installed-driver-and-toolkit Linux shape that the variant targets: when to pick it over the passthrough and vGPU variants, prerequisites (host driver + host nvidia-container-toolkit registered with containerd via nvidia-ctk runtime configure, validated with nvidia-smi over kubectl debug), the host-driver reuse path (driver.enabled=false, so the operator uses the pre-installed driver at its standard location with no driverInstallDir override needed on a stock apt install), the Talos caveat with a pointer to the values-native-talos.yaml reference, install steps, a sample CUDA pod for verification, the variant comparison matrix, and a note on why stacking HAMi directly on the container variant on the management cluster is not a supported combination yet (both register nvidia.com/gpu). Lands under operations/ — symmetric with virtualization/gpu.md (VM passthrough on management cluster) and kubernetes/gpu-sharing.md (HAMi in tenant Kubernetes addons). Assisted-By: Claude <[email protected]> Signed-off-by: Aleksei Sviridkin <[email protected]>
|
Thanks for the careful review — all four points are addressed in the latest push.
On the smoke test (item 1): I have not run it on a real Ubuntu GPU node — no hardware on hand. The config now matches the documented apt-host wiring (legacy |
Andrei Kvapil (kvaps)
left a comment
There was a problem hiding this comment.
LGTM. All three substantive items from the earlier review are addressed in the post-review commit: cdi.enabled: false is pinned with the corrected rationale, the vfioManager comment is rewritten to reflect that upstream renders it unconditionally (zero pods only because of the vm-passthrough node selector), and the docs now state that apt install nvidia-container-toolkit installs binaries only and the host must run nvidia-ctk runtime configure --runtime=containerd. New bats test pins cdi off. CI green.
One thing not provable from the diff: a real-node smoke test of a CUDA pod on a container-variant host (the prior review gated partly on this). If that's been done out-of-band, this is good to go from my side.
Note: this and #2767/#2768 all edit docs/gpu-vgpu.md — whichever lands later will need a docs rebase.
Document the new container variant of cozystack.gpu-operator, paired with cozystack/cozystack#2766. Covers the apt-installed-driver-and-toolkit Linux shape that the variant targets: when to pick it over the passthrough and vGPU variants, prerequisites (host driver + host nvidia-container-toolkit registered with containerd via nvidia-ctk runtime configure, validated with nvidia-smi over kubectl debug), the host-driver reuse path (driver.enabled=false, so the operator uses the pre-installed driver at its standard location with no driverInstallDir override needed on a stock apt install), the Talos caveat with a pointer to the values-native-talos.yaml reference, install steps, a sample CUDA pod for verification, the variant comparison matrix, and a note on why stacking HAMi directly on the container variant on the management cluster is not a supported combination yet (both register nvidia.com/gpu). Lands under operations/ — symmetric with virtualization/gpu.md (VM passthrough on management cluster) and kubernetes/gpu-sharing.md (HAMi in tenant Kubernetes addons). Assisted-By: Claude <[email protected]> Signed-off-by: Aleksei Sviridkin <[email protected]>
Document the new container variant of cozystack.gpu-operator, paired with cozystack/cozystack#2766. Covers the apt-installed-driver-and-toolkit Linux shape that the variant targets: when to pick it over the passthrough and vGPU variants, prerequisites (host driver + host nvidia-container-toolkit registered with containerd via nvidia-ctk runtime configure, validated with nvidia-smi over kubectl debug), the host-driver reuse path (driver.enabled=false, so the operator uses the pre-installed driver at its standard location with no driverInstallDir override needed on a stock apt install), the Talos caveat with a pointer to the values-native-talos.yaml reference, install steps, a sample CUDA pod for verification, the variant comparison matrix, and a note on why stacking HAMi directly on the container variant on the management cluster is not a supported combination yet (both register nvidia.com/gpu). Lands under operations/ — symmetric with virtualization/gpu.md (VM passthrough on management cluster) and kubernetes/gpu-sharing.md (HAMi in tenant Kubernetes addons). Assisted-By: Claude <[email protected]> Signed-off-by: Aleksei Sviridkin <[email protected]>
## What this PR does Add a new operations guide describing the `container` variant of `cozystack.gpu-operator` — the architectural mode for containerized GPU workloads (CUDA pods, ML training, inference) on Linux GPU nodes that already ship the NVIDIA driver and `nvidia-container-toolkit` via the distro package manager. The new page lands at `content/en/docs/next/operations/gpu-container-workloads.md` and rounds out the GPU documentation surface: - [Running VMs with GPU Passthrough](/docs/next/virtualization/gpu/) — VFIO passthrough of whole GPUs to KubeVirt VMs (`default` variant). - [GPU Sharing with HAMi](/docs/next/kubernetes/gpu-sharing/) — fractional GPU sharing in tenant Kubernetes clusters. - **[Running Containerized GPU Workloads](/docs/next/operations/gpu-container-workloads/)** — this page. Containerized GPU workloads on management nodes (`container` variant). Content covers when to pick the variant (host driver + host toolkit + a containerd-registered `nvidia` runtime prerequisite), the host-driver reuse path (`driver.enabled=false`, so the operator uses the pre-installed driver at its standard location with no `driverInstallDir` override on a stock apt install), the Talos caveat with a pointer to the `examples/values-native-talos.yaml` reference, install steps with `Package` CR `variant: container`, a sample CUDA pod for verification, why stacking HAMi directly on this variant is not supported yet, and a three-row variant comparison matrix. Companion to cozystack/cozystack#2766, which adds the `container` variant itself. ### Release note ```release-note docs(operations): add guide for containerized GPU workloads via the gpu-operator `container` variant. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * New guide for running containerized GPU workloads on cluster nodes: prerequisites, installation via the Package CR, explicit warning against using bundles.enabledPackages for this variant, operator health and GPU allocatable verification, sample CUDA Pod workflow, fractional GPU sharing via HAMi, and a comparison of container, default (VM passthrough), and vGPU variants. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
These four guides were written into cozystack/cozystack under `docs/` inside the feature PRs that added the code, and never routed anywhere a user looks. They are operator facing how-tos with no reason to sit in the source tree, so I moved them here, into both `next/` and `v1.6/`. ### New pages - `virtualization/vgpu.md` - NVIDIA vGPU on the vgpu variant: two host driver models, building the vGPU Manager image, SR-IOV profile assignment, DLS licensing, L40S profile table, OS support. - `operations/troubleshooting/gpu-operator-host-driver.md` - passthrough variant refusing to bind vfio-pci when the host already carries an apt installed driver. This was a 120 line runbook wedged inside the vGPU guide, it is its own problem so it gets its own page. - `networking/vm-external-vlan.md` - bridging a VM onto a physically routed VLAN, and why macvlan does not work with kubevirt bridge binding. - `networking/hubble.md` - enabling hubble, plus the four dashboards cozystack ships for it. Dropped stale content instead of carrying it over: a "Last verified ... this PR's vgpu variant" stamp, and two claims that the container variant is unmerged (it landed in cozystack/cozystack#2766 last June, so the runbook points at it as the no-purge alternative now). Rechecked NVIDIA/k8s-driver-manager#191, still open. Two fixes to existing pages while wiring the links. `virtualization/gpu.md` said vGPU uses mediated devices, that is only true up to Ampere, Ada Lovelace and newer use SR-IOV virtual functions. And the hubble dashboards come from `dashboards-infra.list`, which renders only for tenant-root and cozy-monitoring, so they appear in the platform grafana and not in a tenant's own. The CNI plugin staging contract that shared the vm-external-vlan document stays in cozystack/cozystack as `packages/system/multus/README.md`, because a bats suite asserts its prose against the Dockerfile and the manifest. Deletion of the originals is a separate PR there, i'll link it once it is open.
The container variant landed in #2766 on 2026-06-09. That change updated the Variants section and the OS support table but left two passages untouched, both written a fortnight earlier while the variant was still a pull request. The passthrough host-preparation section called it "not part of the current package", and the known-limitation list headed it "not yet merged" under a sentence promising that neither listed path was available yet. A reader working through the passthrough purge workaround was told the no-purge alternative did not exist. Say instead that the variant ships, and name the part that is easy to get wrong when reaching for it: bundles.iaas.gpuOperatorVariant rejects "container" by design, so selecting it goes through bundles.disabledPackages plus a hand-written Package CR. The Last verified line at the top of the file carried the same PR-relative framing for the vgpu variant, which is also a registered variant now. Name it plainly; on main there is no "this PR" for a reader to resolve. The upstream guard the section documents is unchanged. The container variant sidesteps isHostDriver rather than fixing it, so passthrough on a host with a pre-installed driver still needs the purge. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <[email protected]>
The container variant landed in #2766 on 2026-06-09. That change updated the Variants section and the OS support table but left two passages untouched, both written a fortnight earlier while the variant was still a pull request. The passthrough host-preparation section called it "not part of the current package", and the known-limitation list headed it "not yet merged" under a sentence promising that neither listed path was available yet. A reader working through the passthrough purge workaround was told the no-purge alternative did not exist. Say instead that the variant ships, and name the part that is easy to get wrong when reaching for it: bundles.iaas.gpuOperatorVariant rejects "container" by design, so selecting it goes through bundles.disabledPackages plus a hand-written Package CR. The Last verified line at the top of the file carried the same PR-relative framing for the vgpu variant, which is also a registered variant now. Name it plainly; on main there is no "this PR" for a reader to resolve. The upstream guard the section documents is unchanged. The container variant sidesteps isHostDriver rather than fixing it, so passthrough on a host with a pre-installed driver still needs the purge. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <[email protected]>
The container variant shipped in #2766 on 2026-06-09. Two passages in this file still described it as unreleased: the passthrough host-preparation section called it "not part of the current package", and the known-limitation list headed it "not yet merged" under a sentence promising that neither listed path was available yet. A reader working through the passthrough purge workaround was told the no-purge alternative did not exist. The two changes crossed in flight rather than one missing the other. #2766 updated the document as it then stood. The stale passages were written on 2026-05-28 while it was still open and landed eleven minutes behind it, already out of date on arrival. Say instead that the variant ships, and name the part that is easy to get wrong when reaching for it: bundles.iaas.gpuOperatorVariant rejects "container" by design, so selecting it goes through bundles.disabledPackages plus a Package CR under that same name, which is how a Package resolves its source. The Last verified line at the top of the file carried the same PR-relative framing for the vgpu variant, which is a registered variant now too. Name it plainly; on main there is no "this PR" for a reader to resolve. The upstream guard the section documents is unchanged. The container variant sidesteps isHostDriver rather than fixing it, so passthrough on a host with a pre-installed driver still needs the purge. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <[email protected]>
What this PR does
Add a third architectural variant to
cozystack.gpu-operatorfor hosts where the NVIDIA driver andnvidia-container-toolkitare already installed by the distro package manager (the typical Ubuntu/Debian GPU node shape: apt-installed driver + apt-installed CT).The existing variants do not produce a working setup in that shape.
default(passthrough) runsvfioManager, which unbinds the host driver to bindvfio-pci— with the host driver active,k8s-driver-managerearly-exits and the bind never happens, so the GPU never reaches a pod.vgpurequires the proprietary NVIDIA vGPU host driver and a license server; the user-installed open or proprietary driver does not satisfy it.The new
containervariant maps onto upstream gpu-operator's third mode (sandboxWorkloads.enabled=false+devicePlugin.enabled=true) with every component that would conflict with the host install switched off:driver.enabled=false— use the host driver.toolkit.enabled=false— host already hasnvidia-container-toolkit. Enabling the operator's toolkit DaemonSet would overwrite the/etc/containerd/config.tomlthe host package configured (vianvidia-ctk runtime configure), breaking the host runtime wiring. Matches NVIDIA's documented guidance and the existingexamples/values-native-talos.yamlreference, which pins the same flag for the same reason.devicePlugin.enabled=true— publishnvidia.com/gputo the kubelet.vfioManager.enabled=false— do not unbind the host driver. Upstream renders thistrueunconditionally; it only stays at zero pods because no node carries avm-passthroughsandbox assignment whensandboxWorkloadsis off — pinned off so the rendered policy matches intent.cdi.enabled=false— upstream defaults thistrue, but CDI spec generation is serviced by the operator-managed toolkit DaemonSet this variant disables. An apt host doesn't auto-generate CDI specs (nvidia-ctk cdi generateis a manual step) and uses the classicnvidia-container-runtimehook, so leaving CDI on would point the device plugin at CDI injection with no specs on the host and silently break allocation.sandboxWorkloads.enabled=false— regular pod workloads, not VMs. With this off, upstreamdefaultWorkloadis alreadycontainer, so no override is needed.Host prerequisite: because the operator's toolkit component is disabled, the node's containerd must already have the
nvidiaruntime registered (nvidia-ctk runtime configure --runtime=containerd);apt install nvidia-container-toolkitinstalls binaries only and does not wire containerd. Withdriver.enabled=falsethe operator uses the pre-installed host driver at its standard location, so a stock apt install needs nohostPaths.driverInstallDiroverride (Talos lands the driver under a non-standard prefix — seeexamples/values-native-talos.yaml).The bundle wiring (
packages/core/platform/templates/bundles/iaas.yaml) already enablescozystack.gpu-operatoras an optional package — no bundle changes required. Users opt into this variant by settingvariant: containerin theirPackageCR.Verified locally with
helm templateagainstvalues.yaml+values-container.yaml: ClusterPolicy renders withdriver.enabled=false,toolkit.enabled=false,devicePlugin.enabled=true,vfioManager.enabled=false,cdi.enabled=false,sandboxWorkloads.enabled=false. Platformhelm unittestand thegpu-operatorvariant bats suite are green. Not yet smoke-tested on a real Ubuntu GPU node — the config matches the documented apt-host wiring (legacynvidia-container-runtimehook, CDI off), but an end-to-end CUDA-pod run on hardware is still owed.Closes #2764
Release note
Summary by CodeRabbit
New Features
Documentation
Tests