Files
cluster-platform-v3/templates/longhorn.yaml

44 lines
1.5 KiB
YAML

{{- if .Values.longhorn.enabled }}
# Tenant data StorageClass. Tower's instance overlays don't pin a
# storageClassName today (they let the cluster default decide). Phase
# 1 of ADR 0003 just defines this class so Phase 2/3 can flip new
# instances to bind here without further chart changes.
#
# `replicaCount` comes from values; Standalone tier ships replicas=1
# (durability is hourly S3, not local mirrors).
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: longhorn-tenants
annotations:
# Not the cluster default in Phase 1 — explicit opt-in only.
storageclass.kubernetes.io/is-default-class: "false"
provisioner: driver.longhorn.io
allowVolumeExpansion: true
reclaimPolicy: Delete
volumeBindingMode: Immediate
parameters:
numberOfReplicas: "{{ .Values.longhorn.replicas }}"
staleReplicaTimeout: "30"
fromBackup: ""
# fsType: ext4 is the default; explicit so the contract is in Git.
fsType: "ext4"
---
# VolumeSnapshotClass — the API surface the Tower backend will
# consume in Phase 3 to take snapshots of source PVCs before
# spawn-env / Refresh ↓.
#
# `type: snap` (Longhorn's in-place snapshot) is what we want for
# the fast Clone path: the snapshot is a CoW reference, not an S3
# upload. `type: bak` is the slower S3-bound block backup, used
# only by the daily DR layer.
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: longhorn-snapshot-class
driver: driver.longhorn.io
deletionPolicy: Delete
parameters:
type: snap
{{- end }}