# Dedicated StorageClass for paperless-ngx document media, backed by the 4TB # USB HDD on talos-cp-3 (see longhorn-add-disks-job.yaml). Single disk, single # node — no Longhorn replica is possible, so numberOfReplicas is 1 by # necessity, not choice. diskSelector pins placement to the tagged disk only, # so a volume from this class never lands on cp-3's regular (already # DiskPressure) default pool. reclaimPolicy is Retain, not Delete: a PVC # accident here has no replica to fall back on, so an accidental delete must # not also take the underlying volume with it. apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: longhorn-paperless-media annotations: # StorageClass.parameters is immutable - any future edit here needs # delete+recreate, not patch. Same fix as longhorn-cnpg-storageclass.yaml; # safe since a StorageClass is only consulted at provisioning time. argocd.argoproj.io/sync-options: Replace=true,Force=true provisioner: driver.longhorn.io allowVolumeExpansion: true reclaimPolicy: Retain volumeBindingMode: WaitForFirstConsumer parameters: numberOfReplicas: "1" # diskSelector alone is sufficient: only cp-3 has a disk tagged # paperless-media, so placement is already pinned. A nodeSelector value # here must be a Longhorn *node* tag (set via nodes.longhorn.io spec.tags), # not a Kubernetes hostname - "talos-cp-3" was never a node tag, which made # every provision attempt fail with "specified node tag talos-cp-3 does # not exist". diskSelector: "paperless-media" staleReplicaTimeout: "30" fsType: "ext4"