Files
Keybard-Vagabond-Demo/manifests/infrastructure/postgresql/postgresql-storageclass.yaml

31 lines
775 B
YAML

---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: longhorn-postgresql
annotations:
storageclass.kubernetes.io/is-default-class: "false"
provisioner: driver.longhorn.io
allowVolumeExpansion: true
parameters:
# Single replica as recommended by CloudNativePG docs
# PostgreSQL handles replication at application level
numberOfReplicas: "1"
staleReplicaTimeout: "2880"
fromBackup: ""
fsType: "xfs"
dataLocality: "strict-local"
# Automatically assign S3 backup jobs to PostgreSQL volumes
recurringJobSelector: |
[
{
"name":"longhorn-s3-backup",
"isGroup":true
},
{
"name":"longhorn-s3-backup-weekly",
"isGroup":true
}
]
reclaimPolicy: Retain
volumeBindingMode: Immediate