feat: add KubeVirt and CDI for VM-based workloads#1496
Draft
feat: add KubeVirt and CDI for VM-based workloads#1496
Conversation
Deploy KubeVirt (v1.8.0) and CDI (v1.65.0) as vendored operator manifests in the infrastructure-controllers layer. - KubeVirt operator + CR in k8s/bases/infrastructure/controllers/kubevirt/ - CDI operator + CR in k8s/bases/infrastructure/controllers/cdi/ - Docker provider: useEmulation: true (QEMU software emulation, no KVM) - Hetzner workers: kvm + kvm_intel kernel modules via Talos patch - Pod-security labels added to both namespaces (privileged + enforce-version) KubeVirt has no official Helm chart, so the operator manifests are vendored from the GitHub release assets. Update by re-downloading from the release page and committing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds KubeVirt and CDI to the platform GitOps repo so clusters can run VM-based workloads (enabling VM-capable local/dev clusters and E2E testing for ksail’s Omni provider).
Changes:
- Adds vendored KubeVirt (v1.8.0) and CDI (v1.65.0) operator manifests plus their corresponding CRs under
k8s/bases/infrastructure/controllers/. - Adds Docker-provider override to enable KubeVirt software emulation (
useEmulation: true) for environments without KVM. - Adds a Talos worker patch to load KVM kernel modules on Hetzner workers for hardware acceleration.
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| talos/workers/kubevirt.yaml | Loads KVM kernel modules on Talos worker nodes for KubeVirt acceleration on Hetzner. |
| k8s/providers/docker/infrastructure/controllers/kustomization.yaml | Applies a Docker-provider Kustomize patch to the KubeVirt CR. |
| k8s/providers/docker/infrastructure/controllers/kubevirt/patches/kubevirt-cr-patch.yaml | Enables useEmulation: true for KubeVirt on Docker-based clusters. |
| k8s/bases/infrastructure/controllers/kustomization.yaml | Registers CDI and KubeVirt controller components in the shared controllers base. |
| k8s/bases/infrastructure/controllers/kubevirt/kustomization.yaml | Wires KubeVirt operator + CR and patches Pod Security enforce-version label. |
| k8s/bases/infrastructure/controllers/kubevirt/kubevirt-cr.yaml | Adds the base KubeVirt custom resource instance. |
| k8s/bases/infrastructure/controllers/cdi/kustomization.yaml | Wires CDI operator + CR and patches Pod Security enforce/enforce-version labels. |
| k8s/bases/infrastructure/controllers/cdi/cdi-operator.yaml | Vendored CDI operator release manifest (CRDs/RBAC/Deployments, etc.). |
| k8s/bases/infrastructure/controllers/cdi/cdi-cr.yaml | Adds the CDI custom resource instance. |
| kind: CDI | ||
| metadata: | ||
| name: cdi | ||
| namespace: cdi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds KubeVirt (v1.8.0) and CDI (v1.65.0) to the platform for running VMs alongside containers. This enables the dev cluster and E2E testing of ksail's Omni provider.
What changed
KubeVirt operator + CR
kubevirt-operator.yamlfrom v1.8.0 releasekubevirtwith privileged pod-security labelsCDI (Containerized Data Importer) operator + CR
cdi-operator.yamlfrom v1.65.0 releasecdiwith privileged pod-security labelsProvider-specific configuration
useEmulation: truepatch — QEMU software emulation (no hardware KVM in Docker containers)kvm+kvm_intelkernel modules for native KVM accelerationDesign decisions
privileged+enforce-version: latest).How to update versions
Validation
kubectl kustomize k8s/clusters/local/— passeskubectl kustomize k8s/clusters/prod/— passesuseEmulation: trueuseEmulation