Skip to content

Commit 5fd1c45

Browse files
committed
Add support for additionalCommandArgs and configurable secretKey fields in barmanObjectStore.
1 parent 0dcefbe commit 5fd1c45

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

charts/cluster/templates/_backup.tpl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,20 @@ backup:
1010
encryption: {{ .Values.backups.wal.encryption }}
1111
{{- end }}
1212
maxParallel: {{ .Values.backups.wal.maxParallel }}
13+
{{- if .Values.backups.wal.additionalCommandArgs }}
14+
additionalCommandArgs:
15+
{{- toYaml .Values.backups.wal.additionalCommandArgs | nindent 8 }}
16+
{{- end }}
1317
data:
1418
compression: {{ .Values.backups.data.compression }}
1519
{{- if .Values.backups.data.encryption }}
1620
encryption: {{ .Values.backups.data.encryption }}
1721
{{- end }}
1822
jobs: {{ .Values.backups.data.jobs }}
23+
{{- if .Values.backups.data.additionalCommandArgs }}
24+
additionalCommandArgs:
25+
{{- toYaml .Values.backups.data.additionalCommandArgs | nindent 8 }}
26+
{{- end }}
1927

2028
{{- $d := dict "chartFullname" (include "cluster.fullname" .) "scope" .Values.backups "secretPrefix" "backup" }}
2129
{{- include "cluster.barmanObjectStoreConfig" $d | nindent 2 }}

charts/cluster/templates/_barman_object_store.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
{{- else }}
2929
accessKeyId:
3030
name: {{ $secretName }}
31-
key: ACCESS_KEY_ID
31+
key: {{ .scope.secret.accessKeyIdField | default "ACCESS_KEY_ID" }}
3232
secretAccessKey:
3333
name: {{ $secretName }}
34-
key: ACCESS_SECRET_KEY
34+
key: {{ .scope.secret.secretAccessKeyField | default "ACCESS_SECRET_KEY" }}
3535
{{- end }}
3636
{{- else if eq .scope.provider "azure" }}
3737
{{- if empty .scope.destinationPath }}

charts/cluster/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,8 @@ backups:
418418
create: true
419419
# -- Name of the backup credentials secret
420420
name: ""
421+
accessKeyIdField: ""
422+
secretAccessKeyField: ""
421423

422424
wal:
423425
# -- WAL compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`.
@@ -426,13 +428,15 @@ backups:
426428
encryption: AES256
427429
# -- Number of WAL files to be archived or restored in parallel.
428430
maxParallel: 1
431+
additionalCommandArgs: []
429432
data:
430433
# -- Data compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`.
431434
compression: gzip
432435
# -- Whether to instruct the storage provider to encrypt data files. One of `` (use the storage container default), `AES256` or `aws:kms`.
433436
encryption: AES256
434437
# -- Number of data files to be archived or restored in parallel.
435438
jobs: 2
439+
additionalCommandArgs: []
436440

437441
scheduledBackups:
438442
-

0 commit comments

Comments
 (0)