Files
home-network-k3s-impl/platform/kubevirt
jakman85andClaude Opus 4.8 7a3da96d9f fix(cdi): single-replica scratch class + 40Gi UniFi disk (fix insufficient-storage import)
The UniFi Block import got past the device-permission fix but then failed
ReplicaSchedulingFailure / "insufficient storage": CDI sizes scratch ~= the disk
virtual size and, on the default 3-replica `longhorn` class, the ~60Gi scratch x3
(189G) on top of the disk's x3 (180G) overflowed the Longhorn tier (~125G/node).

- platform/longhorn/storageclasses.yaml: NEW `longhorn-scratch` StorageClass
  (numberOfReplicas: 1) — CDI scratch is ephemeral/throwaway, replicating it 3x is
  waste; if a node dies mid-import CDI just retries.
- platform/kubevirt/cdi-cr.yaml: spec.config.scratchSpaceStorageClass ->
  longhorn-scratch.
- apps/vms/unifi/20-datavolume.yaml: boot disk 60Gi -> 40Gi (UOS min is 25Gi;
  40Gi is comfortable for a home site and lighter on the replicated tier).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-26 15:47:02 -05:00
..

platform/kubevirt

KubeVirt + CDI — run application VMs (IaaS) as Kubernetes resources on the same control plane, network, storage, and GitOps flow as containers.

What this stub is

A Kustomization that will pull the pinned KubeVirt operator + CDI operator release manifests (commented TODO — added in Phase 5), plus the KubeVirt and CDI custom resources that tune them. VM disks land on Longhorn PVCs via CDI; VMs inherit Cilium default-deny + egress classes.

Layer distinction (docs/01): these are Layer-2 application VMs (a feature the platform offers), NOT the Layer-1 cluster-node VMs (which WS-INFRA provisions with OpenTofu/libvirt). Do not conflate them.

Cross-workstream prerequisite

Nodes must expose virtualization extensions (nested virt in dev KVMs; native on prod) — a node baseline prerequisite owned by WS-INFRA (docs/02). Coordinate before Phase 5.

TODO (later phases — Phase 5, gated on Phases 2–3)

  • Add pinned operator release manifests as Kustomize bases; let Renovate maintain versions.
  • Run one representative application VM via a ServiceDefinition kind: vm; prove create/start/stop/ destroy via kubectl/virtctl, Longhorn-backed disk survives rebuild, default-deny + egress apply, guest auto-updates (Phase-5 exit gates).