File tree Expand file tree Collapse file tree 4 files changed +50
-2
lines changed
Expand file tree Collapse file tree 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 }}
22apiVersion : v1
33kind : Secret
44metadata :
1717 {{ include "postgres.gcs" $args | b64enc }}
1818 gcs-key.json : |-
1919 {{ $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 }}
2024 {{- end }}
2125{{- end }}
2226{{- else if .Values.s3 }}
2933 {{ include "postgres.gcs" $args | b64enc }}
3034 gcs-key.json : |-
3135 {{ .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 }}
3240{{- end }}
3341{{- end }}
Original file line number Diff line number Diff line change 4646 name : {{ default .Release.Name .Values.name }}-pgbackrest-secret
4747 global :
4848 {{- range $index, $repo := .Values.multiBackupRepos }}
49- {{- if or $repo.s3 $repo.gcs }}
49+ {{- if or $repo.s3 $repo.gcs $repo.azure }}
5050 repo{{ add $index 1 }}-path : /pgbackrest/{{ $.Release.Namespace }}/{{ default $.Release.Name $.Values.name }}/repo{{ add $index 1 }}
5151 {{- end }}
5252 {{- end }}
6969 {{- else if $repo.gcs }}
7070 gcs :
7171 bucket : {{ $repo.gcs.bucket | quote }}
72+ {{- else if $repo.azure }}
73+ azure :
74+ container : {{ $repo.azure.container | quote }}
7275 {{- end }}
7376 {{- end }}
7477{{- else if .Values.s3 }}
9699 - name : repo1
97100 gcs :
98101 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 }}
99112{{- else }}
100113 repos :
101114 - name : repo1
Original file line number Diff line number Diff line change 200200# key: |
201201# {}
202202
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+
203214# multiBackupRepos allows for backing up to multiple repositories. This is
204215# effectively uses the "quickstarts" for each of the backup types (volume, s3,
205216# gcs, azure). You can have any permutation of these types. You can set up to 4.
224235# bucket: ""
225236# key: |
226237# {}
238+ # - azure:
239+ # account: ""
240+ # key: ""
241+ # container: ""
227242
228243# pgBackRestConfig allows for the configuration of every pgBackRest option
229244# except for "image", which is set by "pgBackRest".
You can’t perform that action at this time.
0 commit comments