fix(cnpg): Add scheduled backup to atlantis chart
To work update the bucket-name and add the `nutanix-s3` secret to the namespace.
This commit is contained in:
@@ -17,8 +17,23 @@ spec:
|
|||||||
# - supervised: requires manual supervision to perform
|
# - supervised: requires manual supervision to perform
|
||||||
# the switchover of the primary
|
# the switchover of the primary
|
||||||
primaryUpdateStrategy: unsupervised
|
primaryUpdateStrategy: unsupervised
|
||||||
|
{{- if .Values.cluster.backup.enabled }}
|
||||||
backup:
|
backup:
|
||||||
retentionPolicy: {{ .Values.cluster.backupRetention | default "60d" }}
|
barmanObjectStore:
|
||||||
|
destinationPath: {{ .Values.cluster.destinationPath | default ""}}
|
||||||
|
serverName: {{ include "Atlantis.fullname" . }}-db
|
||||||
|
endpointURL: http://10.255.241.30:30080
|
||||||
|
s3Credentials:
|
||||||
|
accessKeyId:
|
||||||
|
key: access_key
|
||||||
|
name: cnpg-s3
|
||||||
|
secretAccessKey:
|
||||||
|
key: access_secret
|
||||||
|
name: cnpg-s3
|
||||||
|
wal:
|
||||||
|
compression: snappy
|
||||||
|
retentionPolicy: {{ .Values.cluster.backup.backupRetention | default "60d" }}
|
||||||
|
{{- end}}
|
||||||
storage:
|
storage:
|
||||||
size: {{ .Values.cluster.size | default "5Gi" }}
|
size: {{ .Values.cluster.size | default "5Gi" }}
|
||||||
{{- with .Values.cluster.bootstrap }}
|
{{- with .Values.cluster.bootstrap }}
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{{- if and .Values.cluster.backup.enabled .Values.cluster.enabled -}}
|
||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: ScheduledBackup
|
||||||
|
metadata:
|
||||||
|
name: {{ include "Atlantis.fullname" . }}-db
|
||||||
|
spec:
|
||||||
|
schedule: "0 0 1 * * *"
|
||||||
|
backupOwnerReference: self
|
||||||
|
cluster:
|
||||||
|
name: '{{ include "Atlantis.fullname" . }}-db'
|
||||||
|
{{- end }}
|
||||||
@@ -76,8 +76,10 @@ persistence:
|
|||||||
cluster:
|
cluster:
|
||||||
enabled: true
|
enabled: true
|
||||||
instances: 1
|
instances: 1
|
||||||
backupEnabled: true
|
destinationPath: "s3://cnpg/prod-atlantis-db"
|
||||||
backupRetention: 60d
|
backup:
|
||||||
|
enabled: false
|
||||||
|
backupRetention: 60d
|
||||||
size: 5Gi
|
size: 5Gi
|
||||||
bootstrap:
|
bootstrap:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
Reference in New Issue
Block a user