diff --git a/templates/pg_cluster.yaml b/templates/pg_cluster.yaml index 1bc28f3..8495b8b 100644 --- a/templates/pg_cluster.yaml +++ b/templates/pg_cluster.yaml @@ -65,3 +65,7 @@ spec: storage: storageClass: {{ .Values.persistence.storageClass }} size: {{ .Values.persistence.size }} + {{- with .Values.backup }} + backup: + {{- toYaml . | nindent 4 }} + {{- end }} \ No newline at end of file diff --git a/values.yaml b/values.yaml index b79a435..5cafd66 100644 --- a/values.yaml +++ b/values.yaml @@ -188,3 +188,15 @@ postgresql: ## enabled: false ## source: "source-db" # must be defined in 'init.externalClusters' replica: {} + +## Add backup capability to all clusters +## https://cloudnative-pg.io/documentation/1.27/backup/ +## +backup: + ## Configure the backup method to use k8s VolumeSnapshots as a default + ## https://cloudnative-pg.io/documentation/1.27/appendixes/backup_volumesnapshot/ + ## + volumeSnapshot: + ## @param backup.volumeSnapshot.className VolumeSnapshotClass to be used to make backups + ## + className: csi-cephfsplugin-snapclass \ No newline at end of file