From cd91a16c75a37f2f68b5f7ce675ff44beae9e65d Mon Sep 17 00:00:00 2001 From: alexlebens Date: Thu, 16 May 2024 17:19:41 -0500 Subject: [PATCH] pass destinationPath through to values --- charts/postgres-cluster/Chart.yaml | 2 +- charts/postgres-cluster/templates/_backup.tpl | 2 +- .../postgres-cluster/templates/_bootstrap.tpl | 2 +- charts/postgres-cluster/values.yaml | 19 +++++++++---------- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/charts/postgres-cluster/Chart.yaml b/charts/postgres-cluster/Chart.yaml index 12e071e..867f05d 100644 --- a/charts/postgres-cluster/Chart.yaml +++ b/charts/postgres-cluster/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: postgres-cluster -version: 2.5.0 +version: 3.0.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 71222c7..3904688 100644 --- a/charts/postgres-cluster/templates/_backup.tpl +++ b/charts/postgres-cluster/templates/_backup.tpl @@ -3,7 +3,7 @@ backup: retentionPolicy: {{ .Values.backup.retentionPolicy }} barmanObjectStore: - destinationPath: "s3://{{ .Values.backup.endpointBucket }}/{{ .Values.kubernetesClusterName }}/{{ include "cluster.backupName" . }}" + destinationPath: {{ .Values.backup.destinationPath }} endpointURL: {{ .Values.backup.endpointURL }} {{- if .Values.backup.endpointCA }} endpointCA: diff --git a/charts/postgres-cluster/templates/_bootstrap.tpl b/charts/postgres-cluster/templates/_bootstrap.tpl index df8b20f..d3cf041 100644 --- a/charts/postgres-cluster/templates/_bootstrap.tpl +++ b/charts/postgres-cluster/templates/_bootstrap.tpl @@ -63,7 +63,7 @@ externalClusters: - name: {{ include "cluster.recoveryServerName" . }} barmanObjectStore: serverName: {{ include "cluster.recoveryServerName" . }} - destinationPath: "s3://{{ .Values.recovery.endpointBucket }}/{{ .Values.kubernetesClusterName }}/postgresql/{{ include "cluster.recoveryInstanceName" . }}" + destinationPath: {{ .Values.recovery.destinationPath }} endpointURL: {{ .Values.recovery.endpointURL }} {{- with .Values.recovery.endpointCA }} endpointCA: diff --git a/charts/postgres-cluster/values.yaml b/charts/postgres-cluster/values.yaml index 5484c29..dc81fa4 100644 --- a/charts/postgres-cluster/values.yaml +++ b/charts/postgres-cluster/values.yaml @@ -15,9 +15,6 @@ type: postgresql # * `replica` - Create database as a replica from another CNPG cluster mode: standalone -# Generates bucket name and path for recovery and backup, creates: //postgresql/{{ .Release.Name }} -kubernetesClusterName: "" - cluster: instances: 3 @@ -84,7 +81,8 @@ cluster: # BootstrapInitDB is the configuration of the bootstrap process when initdb is used. # See: https://cloudnative-pg.io/documentation/current/bootstrap/ # See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-bootstrapinitdb - initdb: {} + initdb: + {} # database: app # owner: app # secret: "" # Name of the secret containing the initial credentials for the owner of the user database. If empty a new secret will be created from scratch @@ -96,10 +94,9 @@ recovery: pitrTarget: time: "" - # Overrides the provider specific default endpoint. Defaults to: - # S3: https://s3..amazonaws.com" + # S3 https endpoint and the s3:// path endpointURL: "" - endpointBucket: "" + destinationPath: "" # Specifies secret that contains a CA bundle to validate a privately signed certificate, should contain the key ca-bundle.crt endpointCA: "" @@ -140,7 +137,7 @@ replica: # If type microservice only one database is allowed, default is app as standard in cnpg clusters importDatabases: - app - + # If type microservice no roles are imported and ignored importRoles: [] @@ -160,9 +157,11 @@ replica: backup: enabled: false - # Overrides the provider specific default endpoint + # S3 endpoint starting with "https://" endpointURL: "" - endpointBucket: "" + + # S3 path starting with "s3://" + destinationPath: "" # Specifies secret that contains a CA bundle to validate a privately signed certificate, should contain the key ca-bundle.crt endpointCA: ""