Adds the VM/CDI storage tier approved by the PM (RWX for live-migration): - platform/external-snapshotter (NEW, controllers pass): the cluster-singleton snapshot.storage.k8s.io control plane (CRDs + snapshot-controller in kube-system), pinned v8.2.0 (Kubernetes deps aligned to 1.31 since v8.1.0; this cluster is k3s v1.31.5). These CRDs were absent — only snapshots.longhorn.io and kubevirt.io snapshot CRDs existed. - platform/longhorn/volumesnapshotclass.yaml (NEW, platform-config): the driver.longhorn.io VolumeSnapshotClass (type: snap, in-cluster). - platform/kubevirt/cdi-storageprofiles.yaml (NEW, platform-config): StorageProfile longhorn -> cloneStrategy: snapshot; StorageProfile longhorn-vm -> snapshot clone + claimPropertySets RWX/Block. Non-degraded default virt class clears CDIDefaultStorageClassDegraded. - platform/longhorn/storageclasses.yaml: NEW longhorn-vm StorageClass — migratable: "true" (Longhorn's KubeVirt-live-migration knob; RWX/Block-only on 1.7.3), is-default-virt-class (NOT the k8s default; longhorn stays RWO default). - platform/kubevirt/kubevirt-cr.yaml: comment only — LiveMigration is GA on v1.9 (no feature gate); no cluster-wide evictionStrategy (would wedge RWO-disk drains); live-migration stays per-VM opt-in on a longhorn-vm disk. Co-Authored-By: Claude Opus 4.8 <[email protected]>
29 lines
1.6 KiB
YAML
29 lines
1.6 KiB
YAML
---
|
|
# Longhorn VolumeSnapshotClass — the CSI snapshot recipe for driver.longhorn.io.
|
|
#
|
|
# CONSUMES the snapshot.storage.k8s.io CRD registered by platform/external-snapshotter (controllers
|
|
# pass), so — like the KubeVirt/CDI CRs — this CR is applied by the `platform-config` Flux
|
|
# Kustomization (dependsOn: platform), not in the controllers pass. It lives HERE beside the Longhorn
|
|
# component for locality and is referenced in place from platform-config/kustomization.yaml.
|
|
#
|
|
# WHY: this is what turns "Longhorn has a CSI driver" into "the cluster can take CSI VolumeSnapshots
|
|
# of Longhorn PVCs". CDI's snapshot smart-clone (cdi-storageprofiles.yaml -> cloneStrategy: snapshot)
|
|
# resolves the driver's VolumeSnapshotClass by matching driver name; this is the only one for
|
|
# driver.longhorn.io, so CDI selects it unambiguously (no is-default-class annotation needed).
|
|
#
|
|
# type: snap -> an in-cluster Longhorn snapshot on the volume's own replicas (fast, no external
|
|
# backupstore required). The alternative `type: bak` uploads to a backup target, which
|
|
# is not configured until Phase 4 (Velero/backupTarget). Clone/restore stay in-cluster.
|
|
# deletionPolicy: Delete -> when the VolumeSnapshot is deleted, its Longhorn snapshot is cleaned up.
|
|
# CDI's clone snapshots are transient, so leaking them would waste replica space.
|
|
apiVersion: snapshot.storage.k8s.io/v1
|
|
kind: VolumeSnapshotClass
|
|
metadata:
|
|
name: longhorn
|
|
labels:
|
|
app.kubernetes.io/part-of: longhorn
|
|
driver: driver.longhorn.io
|
|
deletionPolicy: Delete
|
|
parameters:
|
|
type: snap
|