Files
pieced-threema-gateway-public/deploy/helm/pieced-threema-gateway/templates/database.yaml

40 lines
1.3 KiB
YAML

{{- if .Values.postgres.enabled }}
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: pieced-threema-gateway-db
namespace: {{ .Values.namespace }}
spec:
instances: {{ .Values.postgres.instances }}
bootstrap:
initdb:
database: relay
owner: relay
storage:
size: {{ .Values.postgres.storage.size }}
storageClass: {{ .Values.postgres.storage.storageClass }}
resources:
{{- toYaml .Values.postgres.resources | nindent 4 }}
monitoring:
enablePodMonitor: true
{{- if .Values.postgres.backup.enabled }}
backup:
barmanObjectStore:
destinationPath: s3://{{ .Values.postgres.backup.s3.bucket }}/pieced-threema-gateway-db/
endpointURL: {{ .Values.postgres.backup.s3.endpointURL | quote }}
s3Credentials:
accessKeyId:
name: cnpg-s3-credentials
key: ACCESS_KEY_ID
secretAccessKey:
name: cnpg-s3-credentials
key: ACCESS_SECRET_KEY
wal:
compression: {{ .Values.postgres.backup.wal.compression }}
maxParallel: {{ .Values.postgres.backup.wal.maxParallel }}
data:
compression: {{ .Values.postgres.backup.data.compression }}
retentionPolicy: {{ .Values.postgres.backup.retentionPolicy | quote }}
{{- end }}
{{- end }}