File tree 4 files changed +49
-2
lines changed
4 files changed +49
-2
lines changed Original file line number Diff line number Diff line change
1
+ { {/* Allow for GCS secret information to be stored in a Secret */} }
2
+ { {- define " postgres.gcs" } }
3
+ [global]
4
+ { {- if .gcs } }
5
+ repo{ { add .index 1 } }-gcs-key=/etc/pgbackrest/conf.d/gcs-key.json
6
+ { {- end } }
7
+ { { end } }
Original file line number Diff line number Diff line change 1
- {{- if or .Values.multiBackupRepos .Values.s3 }}
1
+ {{- if or .Values.multiBackupRepos .Values.s3 .Values.gcs }}
2
2
apiVersion : v1
3
3
kind : Secret
4
4
metadata :
@@ -11,11 +11,23 @@ data:
11
11
{{- $args := dict "s3" $repo.s3 "index" $index }}
12
12
s3.conf : |-
13
13
{{ include "postgres.s3" $args | b64enc }}
14
+ {{- else if $repo.gcs }}
15
+ {{- $args := dict "gcs" $repo.gcs "index" $index }}
16
+ gcs.conf : |-
17
+ {{ include "postgres.gcs" $args | b64enc }}
18
+ gcs-key.json : |-
19
+ {{ $repo.gcs.key | b64enc }}
14
20
{{- end }}
15
21
{{- end }}
16
22
{{- else if .Values.s3 }}
17
23
{{- $args := dict "s3" .Values.s3 "index" 0 }}
18
24
s3.conf : |-
19
25
{{ include "postgres.s3" $args | b64enc }}
26
+ {{- else if .Values.gcs }}
27
+ {{- $args := dict "gcs" .Values.gcs "index" 0 }}
28
+ gcs.conf : |-
29
+ {{ include "postgres.gcs" $args | b64enc }}
30
+ gcs-key.json : |-
31
+ {{ .Values.gcs.key | b64enc }}
20
32
{{- end }}
21
33
{{- end }}
Original file line number Diff line number Diff line change 46
46
name : {{ default .Release.Name .Values.name }}-pgbackrest-secret
47
47
global :
48
48
{{- range $index, $repo := .Values.multiBackupRepos }}
49
- {{- if $repo.s3 }}
49
+ {{- if or $repo.s3 $repo.gcs }}
50
50
repo{{ add $index 1 }}-path : /pgbackrest/{{ $.Release.Namespace }}/{{ default $.Release.Name $.Values.name }}/repo{{ add $index 1 }}
51
51
{{- end }}
52
52
{{- end }}
66
66
bucket : {{ $repo.s3.bucket | quote }}
67
67
endpoint : {{ $repo.s3.endpoint | quote }}
68
68
region : {{ $repo.s3.region | quote }}
69
+ {{- else if $repo.gcs }}
70
+ gcs :
71
+ bucket : {{ $repo.gcs.bucket | quote }}
69
72
{{- end }}
70
73
{{- end }}
71
74
{{- else if .Values.s3 }}
83
86
bucket : {{ .Values.s3.bucket | quote }}
84
87
endpoint : {{ .Values.s3.endpoint | quote }}
85
88
region : {{ .Values.s3.region | quote }}
89
+ {{- else if .Values.gcs }}
90
+ configuration :
91
+ - secret :
92
+ name : {{ default .Release.Name .Values.name }}-pgbackrest-secret
93
+ global :
94
+ repo1-path : /pgbackrest/{{ .Release.Namespace }}/{{ default .Release.Name .Values.name }}/repo1
95
+ repos :
96
+ - name : repo1
97
+ gcs :
98
+ bucket : {{ .Values.gcs.bucket | quote }}
86
99
{{- else }}
87
100
repos :
88
101
- name : repo1
Original file line number Diff line number Diff line change 189
189
# # built-in encrpytion system.
190
190
# encryptionPassphrase: ""
191
191
192
+ # gcs allows for Google Cloud Storage (GCS) to be used for backups. This allows
193
+ # for a quick setup with GCS; if you need a more advanced setup, use
194
+ # "pgBackRestConfig".
195
+ # gcs:
196
+ # # bucket is the name of the GCS bucket that the backups will be stored in.
197
+ # bucket: ""
198
+ # # key is a multi-line string that contains the GCS key, which is a JSON
199
+ # # structure.
200
+ # key: |
201
+ # {}
202
+
192
203
# multiBackupRepos allows for backing up to multiple repositories. This is
193
204
# effectively uses the "quickstarts" for each of the backup types (volume, s3,
194
205
# gcs, azure). You can have any permutation of these types. You can set up to 4.
209
220
# region: ""
210
221
# key: ""
211
222
# keySecret: ""
223
+ # - gcs:
224
+ # bucket: ""
225
+ # key: |
226
+ # {}
212
227
213
228
# pgBackRestConfig allows for the configuration of every pgBackRest option
214
229
# except for "image", which is set by "pgBackRest".
You can’t perform that action at this time.
0 commit comments