--- # external-snapshotter — the cluster-wide CSI snapshot control plane (Phase 2, storage). # # WHY: Longhorn's CSI driver (driver.longhorn.io) can create CSI VolumeSnapshots, but the # `snapshot.storage.k8s.io` API (VolumeSnapshot / VolumeSnapshotContent / VolumeSnapshotClass) # and the snapshot-controller that reconciles them are NOT part of k3s or of Longhorn — they are # a SEPARATE, cluster-singleton component (kubernetes-csi/external-snapshotter). Without it the # CRDs are absent (only `snapshots.longhorn.io` + the kubevirt.io snapshot CRDs exist), so: # * no VolumeSnapshotClass can be created (item 2), and # * CDI cannot do SNAPSHOT smart-clone (item 3) — it falls back to slow host-assisted `copy`, # which leaves the default virt StorageClass "degraded" (CDIDefaultStorageClassDegraded). # Installing it here (controllers pass) registers the CRDs; the VolumeSnapshotClass that CONSUMES them # is applied by platform-config (dependsOn: platform), and the CDI StorageProfiles that set # `cloneStrategy: snapshot` by platform-config-cdi (dependsOn: platform-config — their own CRD is # created by cdi-operator only after the `CDI` CR reconciles; see clusters/base/platform-config-cdi.yaml). # # CONTROLLERS/CONFIGS SPLIT (F-MON1): this is the CONTROLLERS half. The snapshot.storage.k8s.io # CRDs are registered by the `client/config/crd` base below; the snapshot-controller Deployment # (into kube-system, upstream default) reconciles VolumeSnapshots. Custom resources that use these # CRDs (the Longhorn VolumeSnapshotClass, item 2) live in platform-config so the CRDs exist first. # # VERSION (Renovate-maintained): external-snapshotter v8.2.0. # * The v8.x line updated its Kubernetes deps to 1.31 at v8.1.0. This cluster is now k3s v1.36.4, # so the v8.2.0 pin is NO LONGER verified against the running Kubernetes version — RE-CHECK it # for 1.36 (a newer external-snapshotter line may be the version-matched choice). Pin left as-is # pending that revalidation. # * snapshot.storage.k8s.io CRDs are served at v1 (GA) — driver.longhorn.io speaks v1, so # Longhorn CSI snapshots + CDI snapshot-clone work against these CRDs. # * The upstream setup manifest pins the controller image to an older v8.0.x tag; the `images` # transformer below re-pins it to v8.2.0 so the running controller matches the CRD version. # * The `client/config/crd` base also ships the beta VolumeGroupSnapshot CRDs; that feature is # gated OFF in the controller (no --enable-volume-group-snapshots arg), so they are inert. # # VENDORED (was remote github bases). The two upstream kustomize dirs are built to LOCAL files # (crds.yaml, snapshot-controller.yaml) at v8.2.0 and committed here. Previously these were REMOTE # bases (github.com/...?ref=v8.2.0) that Flux's kustomize-controller `git fetch`ed on EVERY reconcile; # those fetches intermittently hit the controller's 27s timeout -> "kustomize build failed" -> the # WHOLE `platform` tier flaked (a transient GitHub slowness stalled every downstream app). Local files # make the build OFFLINE + deterministic. NOTE: platform/kubevirt still uses the same remote-base # pattern and carries the same latent fragility (vendor it too if it flakes). # RE-VENDOR on a version bump: # kubectl kustomize "https://github.com/kubernetes-csi/external-snapshotter/client/config/crd?ref=vX.Y.Z" > crds.yaml # kubectl kustomize "https://github.com/kubernetes-csi/external-snapshotter/deploy/kubernetes/snapshot-controller?ref=vX.Y.Z" > snapshot-controller.yaml apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - crds.yaml - snapshot-controller.yaml images: # renovate: datasource=github-releases depName=kubernetes-csi/external-snapshotter # Controller image == CRD version. A version bump = re-vendor crds.yaml + snapshot-controller.yaml # at the new tag (see header) AND bump this newTag. - name: registry.k8s.io/sig-storage/snapshot-controller newTag: v8.7.0