5 changed files with 151 additions and 0 deletions
@ -0,0 +1,31 @@ |
|||||
|
{{- if .Values.postgresql.backup.enabled }} |
||||
|
apiVersion: barmancloud.cnpg.io/v1 |
||||
|
kind: ObjectStore |
||||
|
metadata: |
||||
|
name: {{ .Values.postgresql.clusterName }} |
||||
|
namespace: {{ .Release.Namespace }} |
||||
|
labels: |
||||
|
{{- include "caduser.labels" . | nindent 4 }} |
||||
|
spec: |
||||
|
configuration: |
||||
|
destinationPath: {{ .Values.postgresql.backup.destinationPath }} |
||||
|
endpointURL: {{ .Values.postgresql.backup.s3.endpointURL }} |
||||
|
s3Credentials: |
||||
|
accessKeyId: |
||||
|
name: {{ .Values.postgresql.backup.s3.secretName }} |
||||
|
key: ACCESS_KEY_ID |
||||
|
secretAccessKey: |
||||
|
name: {{ .Values.postgresql.backup.s3.secretName }} |
||||
|
key: ACCESS_SECRET_KEY |
||||
|
{{- if .Values.postgresql.backup.s3.region }} |
||||
|
s3: |
||||
|
region: {{ .Values.postgresql.backup.s3.region }} |
||||
|
{{- end }} |
||||
|
data: |
||||
|
compression: {{ .Values.postgresql.backup.data.compression }} |
||||
|
jobs: {{ .Values.postgresql.backup.data.jobs }} |
||||
|
wal: |
||||
|
compression: {{ .Values.postgresql.backup.wal.compression }} |
||||
|
maxParallel: {{ .Values.postgresql.backup.wal.maxParallel }} |
||||
|
retentionPolicy: {{ .Values.postgresql.backup.retentionPolicy | quote }} |
||||
|
{{- end }} |
||||
@ -0,0 +1,12 @@ |
|||||
|
{{- if and .Values.postgresql.enabled .Values.postgresql.backup.enabled }} |
||||
|
apiVersion: v1 |
||||
|
kind: Secret |
||||
|
metadata: |
||||
|
name: {{ .Values.postgresql.backup.s3.secretName }} |
||||
|
labels: |
||||
|
{{- include "caduser.labels" . | nindent 4 }} |
||||
|
type: Opaque |
||||
|
stringData: |
||||
|
ACCESS_KEY_ID: {{ .Values.postgresql.backup.s3.accessKeyId | quote }} |
||||
|
ACCESS_SECRET_KEY: {{ .Values.postgresql.backup.s3.secretAccessKey | quote }} |
||||
|
{{- end }} |
||||
Loading…
Reference in new issue