File tree 4 files changed +50
-2
lines changed
4 files changed +50
-2
lines changed Original file line number Diff line number Diff line change
1
+ { {/* Allow for Azure secret information to be stored in a Secret */} }
2
+ { {- define " postgres.azure" } }
3
+ [global]
4
+ { {- if .azure } }
5
+ { {- if .azure.account } }
6
+ repo{ { add .index 1 } }-azure-account={ { .azure.account } }
7
+ { {- end } }
8
+ { {- if .azure.key } }
9
+ repo{ { add .index 1 } }-azure-key={ { .azure.key } }
10
+ { {- end } }
11
+ { {- end } }
12
+ { { end } }
Original file line number Diff line number Diff line change 1
- {{- if or .Values.multiBackupRepos .Values.s3 .Values.gcs }}
1
+ {{- if or .Values.multiBackupRepos .Values.s3 .Values.gcs .Values.azure }}
2
2
apiVersion : v1
3
3
kind : Secret
4
4
metadata :
17
17
{{ include "postgres.gcs" $args | b64enc }}
18
18
gcs-key.json : |-
19
19
{{ $repo.gcs.key | b64enc }}
20
+ {{- else if $repo.azure }}
21
+ {{- $args := dict "azure" $repo.azure "index" $index }}
22
+ azure.conf : |-
23
+ {{ include "postgres.azure" $args | b64enc }}
20
24
{{- end }}
21
25
{{- end }}
22
26
{{- else if .Values.s3 }}
29
33
{{ include "postgres.gcs" $args | b64enc }}
30
34
gcs-key.json : |-
31
35
{{ .Values.gcs.key | b64enc }}
36
+ {{- else if .Values.azure }}
37
+ {{- $args := dict "azure" .Values.azure "index" 0 }}
38
+ azure.conf : |-
39
+ {{ include "postgres.azure" $args | b64enc }}
32
40
{{- end }}
33
41
{{- 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 or $repo.s3 $repo.gcs }}
49
+ {{- if or $repo.s3 $repo.gcs $repo.azure }}
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 }}
69
69
{{- else if $repo.gcs }}
70
70
gcs :
71
71
bucket : {{ $repo.gcs.bucket | quote }}
72
+ {{- else if $repo.azure }}
73
+ azure :
74
+ container : {{ $repo.azure.container | quote }}
72
75
{{- end }}
73
76
{{- end }}
74
77
{{- else if .Values.s3 }}
96
99
- name : repo1
97
100
gcs :
98
101
bucket : {{ .Values.gcs.bucket | quote }}
102
+ {{- else if .Values.azure }}
103
+ configuration :
104
+ - secret :
105
+ name : {{ default .Release.Name .Values.name }}-pgbackrest-secret
106
+ global :
107
+ repo1-path : /pgbackrest/{{ .Release.Namespace }}/{{ default .Release.Name .Values.name }}/repo1
108
+ repos :
109
+ - name : repo1
110
+ azure :
111
+ container : {{ .Values.azure.container | quote }}
99
112
{{- else }}
100
113
repos :
101
114
- name : repo1
Original file line number Diff line number Diff line change 200
200
# key: |
201
201
# {}
202
202
203
+ # azure allows for Azure Blob Storage to be used for backups. This allows
204
+ # for a quick setup with Azure Blob Storage; if you need a more advanced setup,
205
+ # use "pgBackRestConfig".
206
+ # azure:
207
+ # # account is the name of the Azure account to be used.
208
+ # account: ""
209
+ # # key is the Secret key used associated with the Azure acount.
210
+ # key: ""
211
+ # # container is the Azure container that the backups will be stored in.
212
+ # container: ""
213
+
203
214
# multiBackupRepos allows for backing up to multiple repositories. This is
204
215
# effectively uses the "quickstarts" for each of the backup types (volume, s3,
205
216
# gcs, azure). You can have any permutation of these types. You can set up to 4.
224
235
# bucket: ""
225
236
# key: |
226
237
# {}
238
+ # - azure:
239
+ # account: ""
240
+ # key: ""
241
+ # container: ""
227
242
228
243
# pgBackRestConfig allows for the configuration of every pgBackRest option
229
244
# except for "image", which is set by "pgBackRest".
You can’t perform that action at this time.
0 commit comments