From 6f5b5ffcb47eaeff1eccc34783a29c90b01bc4bd Mon Sep 17 00:00:00 2001 From: alexlebens Date: Mon, 1 Jul 2024 18:05:00 -0500 Subject: [PATCH] change value inseration --- charts/postgres-cluster/Chart.yaml | 2 +- charts/postgres-cluster/templates/_backup.tpl | 14 +++++++++++++- charts/postgres-cluster/templates/_bootstrap.tpl | 14 +++++++++++++- charts/postgres-cluster/values.yaml | 4 ++-- 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/charts/postgres-cluster/Chart.yaml b/charts/postgres-cluster/Chart.yaml index bfff48a..693a86a 100644 --- a/charts/postgres-cluster/Chart.yaml +++ b/charts/postgres-cluster/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: postgres-cluster -version: 3.6.0 +version: 3.7.0 description: Chart for cloudnative-pg cluster keywords: - database diff --git a/charts/postgres-cluster/templates/_backup.tpl b/charts/postgres-cluster/templates/_backup.tpl index 3904688..5ad2186 100644 --- a/charts/postgres-cluster/templates/_backup.tpl +++ b/charts/postgres-cluster/templates/_backup.tpl @@ -19,12 +19,24 @@ backup: name: {{ include "cluster.backupCredentials" . }} key: ACCESS_SECRET_KEY wal: + {{- if .Values.backup.wal.compression }} compression: {{ .Values.backup.wal.compression }} + {{- end }} + {{- if .Values.backup.wal.encryption }} encryption: {{ .Values.backup.wal.encryption }} + {{- end }} + {{- if .Values.backup.wal.maxParallel }} maxParallel: {{ .Values.backup.wal.maxParallel }} + {{- end }} data: + {{- if .Values.backup.data.compression }} compression: {{ .Values.backup.data.compression }} + {{- end }} + {{- if .Values.backup.data.encryption }} encryption: {{ .Values.backup.data.encryption }} - jobs: {{ .Values.backup.data.jobs }} + {{- end }} + {{- if .Values.backup.data.maxParallel }} + maxParallel: {{ .Values.backup.data.maxParallel }} + {{- end }} {{- end }} {{- end }} diff --git a/charts/postgres-cluster/templates/_bootstrap.tpl b/charts/postgres-cluster/templates/_bootstrap.tpl index 925f6c9..bb4e04b 100644 --- a/charts/postgres-cluster/templates/_bootstrap.tpl +++ b/charts/postgres-cluster/templates/_bootstrap.tpl @@ -78,13 +78,25 @@ externalClusters: name: {{ include "cluster.recoveryCredentials" . }} key: ACCESS_SECRET_KEY wal: + {{- if .Values.recovery.wal.compression }} compression: {{ .Values.recovery.wal.compression }} + {{- end }} + {{- if .Values.recovery.wal.encryption }} encryption: {{ .Values.recovery.wal.encryption }} + {{- end }} + {{- if .Values.recovery.wal.maxParallel }} maxParallel: {{ .Values.recovery.wal.maxParallel }} + {{- end }} data: + {{- if .Values.recovery.data.compression }} compression: {{ .Values.recovery.data.compression }} + {{- end }} + {{- if .Values.recovery.data.encryption }} encryption: {{ .Values.recovery.data.encryption }} - jobs: {{ .Values.recovery.data.jobs }} + {{- end }} + {{- if .Values.recovery.data.maxParallel }} + maxParallel: {{ .Values.recovery.data.maxParallel }} + {{- end }} {{- else }} {{ fail "Invalid cluster mode!" }} {{- end }} diff --git a/charts/postgres-cluster/values.yaml b/charts/postgres-cluster/values.yaml index 1c9b741..a5b05ba 100644 --- a/charts/postgres-cluster/values.yaml +++ b/charts/postgres-cluster/values.yaml @@ -125,7 +125,7 @@ recovery: # Whether to instruct the storage provider to encrypt data files. One of `` (use the storage container default), `AES256` or `aws:kms`. encryption: "" # Number of data files to be archived or restored in parallel. - jobs: 2 + maxParallel: 2 replica: # See https://cloudnative-pg.io/documentation/current/database_import/ @@ -187,7 +187,7 @@ backup: # Whether to instruct the storage provider to encrypt data files. One of `` (use the storage container default), `AES256` or `aws:kms`. encryption: "" # Number of data files to be archived or restored in parallel. - jobs: 2 + maxParallel: 2 # Retention policy for backups retentionPolicy: "30d"