-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdata-restore-configmap.yaml
More file actions
35 lines (34 loc) · 1.79 KB
/
data-restore-configmap.yaml
File metadata and controls
35 lines (34 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{{- if .Values.dataRestore.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "crunchy-postgres.fullname" . }}-data-restore-config
labels:
helm.sh/chart: {{ include "crunchy-postgres.chart" . }}
app.kubernetes.io/name: {{ include "crunchy-postgres.name" . }}
app.kubernetes.io/instance: {{ include "crunchy-postgres.fullname" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- range $key, $value := .Values.labels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
app.kubernetes.io/component: "data-restore-config"
data:
pgbackrest.conf: |
[global]
repo{{ .Values.dataRestore.repo.name | replace "repo" "" }}-type=s3
repo{{ .Values.dataRestore.repo.name | replace "repo" "" }}-s3-bucket={{ .Values.dataRestore.repo.bucket }}
repo{{ .Values.dataRestore.repo.name | replace "repo" "" }}-s3-endpoint={{ .Values.dataRestore.repo.endpoint }}
repo{{ .Values.dataRestore.repo.name | replace "repo" "" }}-s3-region={{ .Values.dataRestore.repo.s3.region | default "not-used" }}
repo{{ .Values.dataRestore.repo.name | replace "repo" "" }}-path={{ .Values.dataRestore.repo.path }}
repo{{ .Values.dataRestore.repo.name | replace "repo" "" }}-s3-uri-style={{ .Values.dataRestore.repo.s3.uriStyle | default "path" }}
log-level-console=info
log-level-file=debug
[{{ .Values.dataRestore.stanza }}]
pg1-host={{ if .Values.dataRestore.target.clusterName }}{{ .Values.dataRestore.target.clusterName }}{{ else }}{{ include "crunchy-postgres.fullname" . }}{{ end }}-primary.{{ .Release.Namespace }}.svc.cluster.local
pg1-port=5432
pg1-user=postgres
pg1-database={{ .Values.dataRestore.target.database }}
{{- end }}