Skip to content

Commit 2900c01

Browse files
authored
docs(gpu): select the container variant from bundle values (cozystack#714)
The container GPU variant can now be set up through the bundle, and the docs say so. cozystack/cozystack#4101 made the `iaas` bundle accept `gpuOperatorVariant: container`, so a hand-written Package CR is no longer the only way to get it. The same change stopped rendering the KubeVirt `HostDevices` gate and `permittedHostDevices` table for `container`. Only `default` and `vgpu` get them. The container workloads page now shows the bundle values and keeps the Package CR for overrides the bundle does not expose. The passthrough and vGPU pages say which variants get the KubeVirt wiring. Only `next/` is changed. The fix is on cozystack `main` and not in any v1.6.x tag, so the `v1.6/` pages still describe the released behaviour. Closes cozystack#685
2 parents cc5e6f9 + ece1bff commit 2900c01

3 files changed

Lines changed: 19 additions & 4 deletions

File tree

‎content/en/docs/next/operations/gpu-container-workloads.md‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,20 @@ With `driver.enabled=false` the operator uses the pre-installed host driver at i
4444

4545
## 1. Install the GPU Operator (container variant)
4646

47-
**Do not** add `cozystack.gpu-operator` to `bundles.enabledPackages` for this variant. The `iaas` bundle renders the GPU operator from `bundles.iaas.gpuOperatorVariant`, which only accepts `default` or `vgpu` — any other value, `container` included, makes the platform chart fail the Helm render (`packages/core/platform/templates/bundles/iaas.yaml`). Apply the `Package` CR directly instead; the platform controller installs it without a bundle entry and without the variant restriction.
47+
The platform's `iaas` bundle deploys the gpu-operator Package CR when `cozystack.gpu-operator` is in `bundles.enabledPackages` and not in `bundles.disabledPackages`, with the variant taken from `bundles.iaas.gpuOperatorVariant`. Set it to `container` in the Platform Package values, and add `cozystack.gpu-operator` to your existing `enabledPackages` list rather than replacing it:
4848

49-
Apply a `Package` CR with `variant: container`:
49+
```yaml
50+
bundles:
51+
iaas:
52+
enabled: true
53+
gpuOperatorVariant: container
54+
enabledPackages:
55+
- cozystack.gpu-operator
56+
```
57+
58+
For this variant the bundle still renders the `KubeVirt` CR with its base settings, but adds no GPU wiring to it: no `HostDevices` feature gate and no `permittedHostDevices` table. The host driver stays bound, so no GPU on the node can be passed through to a VM.
59+
60+
If you need to override something the bundle does not expose (driver settings, custom node selectors, validator or dcgmExporter tweaks), hand-craft a `Package` CR named `cozystack.gpu-operator` with `variant: container` instead, and leave `cozystack.gpu-operator` out of `bundles.enabledPackages` so the platform release does not also manage that Package and overwrite your changes. Put the overrides under `spec.components.gpu-operator.values.gpu-operator` (the package wraps the upstream chart, so its settings sit under a nested `gpu-operator` key). The platform controller installs it without a bundle entry:
5061

5162
```yaml
5263
apiVersion: cozystack.io/v1alpha1
@@ -55,6 +66,10 @@ metadata:
5566
name: cozystack.gpu-operator
5667
spec:
5768
variant: container
69+
components:
70+
gpu-operator:
71+
values:
72+
gpu-operator: {} # upstream gpu-operator chart overrides
5873
```
5974

6075
```bash

‎content/en/docs/next/virtualization/gpu.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ For example, the database entry for A10 reads `2236 GA102GL [A10]`, which resul
102102

103103
## 2. KubeVirt is wired automatically
104104

105-
When `cozystack.gpu-operator` is in `bundles.enabledPackages`, Cozystack mirrors the chosen GPU variant into the `KubeVirt` Custom Resource for you. There is no `kubectl edit kubevirt` step.
105+
When `cozystack.gpu-operator` is in `bundles.enabledPackages` (and not in `bundles.disabledPackages`) and `bundles.iaas.gpuOperatorVariant` is `default` (the package default) or `vgpu`, Cozystack mirrors the chosen GPU variant into the `KubeVirt` Custom Resource for you. There is no `kubectl edit kubevirt` step. The `container` variant gets none of this wiring: it keeps the host driver bound, so no GPU can reach a VM (see [containerized GPU workloads](/docs/next/operations/gpu-container-workloads/)).
106106

107107
Specifically, the platform injects:
108108

‎content/en/docs/next/virtualization/vgpu.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ For Pascal to Ampere GPUs (V100, T4, A100, A30) the mdev model still applies. Fl
108108

109109
## KubeVirt configuration
110110

111-
When `cozystack.gpu-operator` is in `bundles.enabledPackages` (and not also in `bundles.disabledPackages`), the platform mirrors the chosen GPU variant into the `KubeVirt` CR automatically. There is no manual `kubectl patch` step.
111+
When `cozystack.gpu-operator` is in `bundles.enabledPackages` (and not also in `bundles.disabledPackages`) and `bundles.iaas.gpuOperatorVariant` is `default` or `vgpu`, the platform mirrors the chosen GPU variant into the `KubeVirt` CR automatically. There is no manual `kubectl patch` step. The `container` variant gets no KubeVirt wiring at all: it keeps the host driver bound, so no GPU can reach a VM.
112112

113113
If you opt out of bundle management and hand-craft a `cozystack.gpu-operator` Package CR directly — typically to apply overrides the bundle does not expose — the platform does **not** auto-wire `HostDevices` or `permittedHostDevices` into the KubeVirt CR. In that flow you also hand-craft a `cozystack.kubevirt` Package CR with `components.kubevirt.values.extraFeatureGates: [HostDevices]` and the appropriate `permittedHostDevices` block. The escape-hatch values shape under `.gpu` below is documented for the bundle-managed flow only; the manual Package-CR override path takes precedence over the bundle render whenever both exist.
114114

0 commit comments

Comments
 (0)