Skip to content

docs(gpu): drop manual KubeVirt patch step now that the platform auto-wires permittedHostDevices#556

Open
Aleksei Sviridkin (lexfrei) wants to merge 1 commit into
mainfrom
feat/gpu-auto-wiring
Open

docs(gpu): drop manual KubeVirt patch step now that the platform auto-wires permittedHostDevices#556
Aleksei Sviridkin (lexfrei) wants to merge 1 commit into
mainfrom
feat/gpu-auto-wiring

Conversation

@lexfrei
Copy link
Copy Markdown
Contributor

Companion to cozystack/cozystack#2768.

Rewrites step 2 of the GPU Passthrough guide. Until now the page instructed operators to run kubectl edit kubevirt -n cozy-kubevirt and hand-paste a permittedHostDevices.pciHostDevices block — that is the friction that ticket #2765 asked the platform to remove. With cozystack/cozystack#2768 landed, the bundle mirrors the chosen GPU variant into the KubeVirt CR automatically: HostDevices is appended to the feature-gate list and a starter NVIDIA pciHostDevices table (Hopper, Ada Lovelace, Ampere, Turing, Volta) is rendered alongside the operator's .gpu.permittedHostDevices extensions.

The new step 2 documents:

  • The contract — what the platform auto-injects and why (HostDevices gate, NVIDIA default table, externalResourceProvider: true semantics).
  • How to verify (kubectl -n cozy-kubevirt get kubevirt kubevirt -o yaml | yq ...).
  • The escape hatch — gpu.replaceDefaults, gpu.permittedHostDevices.pciHostDevices, plus the consequence of replaceDefaults: true with an empty list (no admittable GPU VMs).
  • The manual Package-CR override path — when an operator hand-crafts cozystack.gpu-operator outside the bundle for advanced overrides, they also hand-craft cozystack.kubevirt with the matching extraFeatureGates / permittedHostDevices. The manual override takes precedence over the bundle render.

Only next/virtualization/gpu.md is touched. The released doc versions (v1.4 and earlier) describe earlier Cozystack releases that still require the manual kubectl edit, and stay as-is.

Release note

docs(gpu): the GPU Passthrough guide no longer instructs operators to manually patch the KubeVirt CR — Cozystack now auto-wires the HostDevices feature gate and a starter NVIDIA permittedHostDevices table whenever cozystack.gpu-operator is enabled in bundles.enabledPackages. Operators extend or replace the defaults via .gpu.permittedHostDevices and .gpu.replaceDefaults.

…-wires permittedHostDevices

Step 2 of the GPU Passthrough guide instructed operators to
`kubectl edit kubevirt -n cozy-kubevirt` and hand-paste a
permittedHostDevices.pciHostDevices block. cozystack/cozystack#2768
removes the need for that step: when cozystack.gpu-operator is in
bundles.enabledPackages, the platform now mirrors the chosen GPU
variant into the KubeVirt CR automatically — appending HostDevices
to the feature-gate list and rendering a starter NVIDIA pciHostDevices
table covering Hopper, Ada Lovelace, Ampere, Turing and Volta.

The new step 2 documents the contract (what the platform auto-injects
and why), the verification recipe, the escape hatch via
.gpu.permittedHostDevices / .gpu.replaceDefaults, and the manual
Package-CR override path used by operators who need overrides the
bundle does not expose (driver settings, custom node selectors,
validator / dcgmExporter tweaks) — in that flow they also hand-craft
the matching cozystack.kubevirt Package CR.

Only next/virtualization/gpu.md is updated; v1.4 and earlier
describe releases that still require the manual patch and stay
as-is.

Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 28, 2026

Deploy Preview for cozystack ready!

Name Link
🔨 Latest commit d4ab140
🔍 Latest deploy log https://app.netlify.com/projects/cozystack/deploys/6a188a20b553bc000864c01d
😎 Deploy Preview https://deploy-preview-556--cozystack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Warning

Review limit reached

@lexfrei, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 47 minutes and 55 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a4d69244-ee23-4e93-b30d-5d9db67f1953

📥 Commits

Reviewing files that changed from the base of the PR and between ef54f10 and d4ab140.

📒 Files selected for processing (1)
  • content/en/docs/next/virtualization/gpu.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/gpu-auto-wiring

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the GPU virtualization documentation to explain that Cozystack now automatically configures and wires KubeVirt when the GPU operator is enabled. It details the automatic injection of host devices, how to extend or replace NVIDIA defaults, and the manual Package-CR override path. The review feedback suggests improving command portability by replacing yq with jq in the verification step, and correcting the configuration path from components.kubevirt.values to spec.values for standalone Package CRs.

Comment on lines +115 to +116
kubectl -n cozy-kubevirt get kubevirt kubevirt -o yaml \
| yq '.spec.configuration | {featureGates: .developerConfiguration.featureGates, permittedHostDevices: .permittedHostDevices}'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Using yq can sometimes lead to compatibility issues depending on whether the user has the Python-based yq (which supports full jq syntax) or the Go-based yq (which has a different expression syntax) installed.

Using kubectl ... -o json | jq ... is much more portable, standard, and guaranteed to work across different environments since jq is universally standardized.

Suggested change
kubectl -n cozy-kubevirt get kubevirt kubevirt -o yaml \
| yq '.spec.configuration | {featureGates: .developerConfiguration.featureGates, permittedHostDevices: .permittedHostDevices}'
kubectl -n cozy-kubevirt get kubevirt kubevirt -o json \
| jq '.spec.configuration | {featureGates: .developerConfiguration.featureGates, permittedHostDevices: .permittedHostDevices}'


### Manual Package-CR override path

If you opt out of bundle management and hand-craft a `cozystack.gpu-operator` Package CR directly (to apply overrides the bundle does not expose — driver settings, custom node selectors, validator / dcgmExporter tweaks), the platform does NOT auto-wire `HostDevices` or `permittedHostDevices` into the KubeVirt CR. In that flow, mirror the bundle behaviour by also creating a `cozystack.kubevirt` Package CR with `components.kubevirt.values.extraFeatureGates: [HostDevices]` and the appropriate `permittedHostDevices` block. The manual Package-CR override path takes precedence over the bundle render whenever both exist.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

When creating a standalone cozystack.kubevirt Package CR directly, the configuration values should be defined under spec.values rather than components.kubevirt.values. The components.<name>.values structure is used when configuring components within the umbrella cozystack-platform package.

Updating this path ensures the standalone Package CR is configured correctly.

Suggested change
If you opt out of bundle management and hand-craft a `cozystack.gpu-operator` Package CR directly (to apply overrides the bundle does not expose — driver settings, custom node selectors, validator / dcgmExporter tweaks), the platform does NOT auto-wire `HostDevices` or `permittedHostDevices` into the KubeVirt CR. In that flow, mirror the bundle behaviour by also creating a `cozystack.kubevirt` Package CR with `components.kubevirt.values.extraFeatureGates: [HostDevices]` and the appropriate `permittedHostDevices` block. The manual Package-CR override path takes precedence over the bundle render whenever both exist.
If you opt out of bundle management and hand-craft a `cozystack.gpu-operator` Package CR directly (to apply overrides the bundle does not expose — driver settings, custom node selectors, validator / dcgmExporter tweaks), the platform does NOT auto-wire `HostDevices` or `permittedHostDevices` into the KubeVirt CR. In that flow, mirror the bundle behaviour by also creating a `cozystack.kubevirt` Package CR with `spec.values.extraFeatureGates: [HostDevices]` and the appropriate `permittedHostDevices` block. The manual Package-CR override path takes precedence over the bundle render whenever both exist.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant