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]>
This commit is contained in:
jakman85andClaude Opus 4.8 committed 2026-08-26 15:47:02 -05:00
1 parent d8101bca38
commit 7a3da96d9f
3 files changed
+28 -6

No files matched your search

+3 -3
View File
@@ -12,8 +12,8 @@
# STORAGE = longhorn-vm (the RWX/migratable StorageClass the storage workstream is adding):
# - accessModes: ReadWriteMany + volumeMode: Block => REQUIRED for KubeVirt LIVE MIGRATION
# (evictionStrategy: LiveMigrate in the VM). A ReadWriteOnce disk cannot live-migrate.
# - 60Gi: the Ubuntu cloud image virtual size is ~3.5Gi; cloud-init growpart/growroot
# expands the root fs to fill the disk on first boot. 60Gi leaves ample room for the
# - 40Gi: the Ubuntu cloud image virtual size is ~3.5Gi; cloud-init growpart/growroot
# expands the root fs to fill the disk on first boot. 40Gi (UOS min is 25Gi) leaves room for the
# UniFi datastore + OS + podman images + updates.
#
# GOTCHA / FLAG: a Block RWX DataVolume import needs CDI scratch space and the importer pod
@@ -46,4 +46,4 @@ spec:
storageClassName: longhorn-vm
resources:
requests:
storage: 60Gi
storage: 40Gi