From e57f85956469dfba112bcf1e79fcd45be07ac761 Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Sat, 24 May 2025 01:41:10 -0500 Subject: [PATCH] change method --- charts/postgres-cluster/Chart.yaml | 2 +- charts/postgres-cluster/README.md | 12 ++++++------ charts/postgres-cluster/templates/object-store.yaml | 4 ++-- charts/postgres-cluster/values.yaml | 4 ---- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/charts/postgres-cluster/Chart.yaml b/charts/postgres-cluster/Chart.yaml index c5df38e..98307cf 100644 --- a/charts/postgres-cluster/Chart.yaml +++ b/charts/postgres-cluster/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: postgres-cluster -version: 6.1.0 +version: 6.1.1 description: Cloudnative-pg Cluster keywords: - database diff --git a/charts/postgres-cluster/README.md b/charts/postgres-cluster/README.md index 9b5b996..16ff181 100644 --- a/charts/postgres-cluster/README.md +++ b/charts/postgres-cluster/README.md @@ -1,6 +1,6 @@ # postgres-cluster -![Version: 6.1.0](https://img.shields.io/badge/Version-6.1.0-informational?style=flat-square) ![AppVersion: v1.26.0](https://img.shields.io/badge/AppVersion-v1.26.0-informational?style=flat-square) +![Version: 6.1.1](https://img.shields.io/badge/Version-6.1.1-informational?style=flat-square) ![AppVersion: v1.26.0](https://img.shields.io/badge/AppVersion-v1.26.0-informational?style=flat-square) Cloudnative-pg Cluster @@ -19,16 +19,16 @@ Cloudnative-pg Cluster | Key | Type | Default | Description | |-----|------|---------|-------------| -| backup | object | `{"enabled":true,"method":"objectStore","objectStore":[{"clusterName":"","data":{"compression":"snappy","encryption":"","jobs":1},"destinationPath":"s3://postgres-backups","endpointCA":{"create":false,"enabled":false,"key":"","name":""},"endpointCredentials":"","endpointURL":"https://nyc3.digitaloceanspaces.com","index":1,"isWALArchiver":true,"name":"external","retentionPolicy":"30d","wal":{"compression":"snappy","encryption":"","maxParallel":1}}],"scheduledBackups":[{"backupName":"external","backupOwnerReference":"self","name":"daily-backup","plugin":"barman-cloud.cloudnative-pg.io","schedule":"0 0 */3 * *","suspend":false}]}` | Backup settings | +| backup | object | `{"enabled":true,"method":"objectStore","objectStore":[{"clusterName":"","data":{"compression":"snappy","encryption":"","jobs":1},"destinationPath":"s3://postgres-backups","endpointCA":{"create":false,"key":"","name":""},"endpointCredentials":"","endpointURL":"https://nyc3.digitaloceanspaces.com","index":1,"isWALArchiver":true,"name":"external","retentionPolicy":"30d","wal":{"compression":"snappy","encryption":"","maxParallel":1}}],"scheduledBackups":[{"backupName":"external","backupOwnerReference":"self","name":"daily-backup","plugin":"barman-cloud.cloudnative-pg.io","schedule":"0 0 */3 * *","suspend":false}]}` | Backup settings | | backup.enabled | bool | `true` | You need to configure backups manually, so backups are disabled by default. | | backup.method | string | `"objectStore"` | Method to create backups, options currently are only objectStore | -| backup.objectStore | list | `[{"clusterName":"","data":{"compression":"snappy","encryption":"","jobs":1},"destinationPath":"s3://postgres-backups","endpointCA":{"create":false,"enabled":false,"key":"","name":""},"endpointCredentials":"","endpointURL":"https://nyc3.digitaloceanspaces.com","index":1,"isWALArchiver":true,"name":"external","retentionPolicy":"30d","wal":{"compression":"snappy","encryption":"","maxParallel":1}}]` | Options for object store backups | +| backup.objectStore | list | `[{"clusterName":"","data":{"compression":"snappy","encryption":"","jobs":1},"destinationPath":"s3://postgres-backups","endpointCA":{"create":false,"key":"","name":""},"endpointCredentials":"","endpointURL":"https://nyc3.digitaloceanspaces.com","index":1,"isWALArchiver":true,"name":"external","retentionPolicy":"30d","wal":{"compression":"snappy","encryption":"","maxParallel":1}}]` | Options for object store backups | | backup.objectStore[0].clusterName | string | `""` | Override the name of the backup cluster, defaults to "cluster.name" | | backup.objectStore[0].data.compression | string | `"snappy"` | Data compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. | | backup.objectStore[0].data.encryption | string | `""` | Whether to instruct the storage provider to encrypt data files. One of `` (use the storage container default), `AES256` or `aws:kms`. | | backup.objectStore[0].data.jobs | int | `1` | Number of data files to be archived or restored in parallel. | | backup.objectStore[0].destinationPath | string | `"s3://postgres-backups"` | Overrides the provider specific default path. Defaults to: S3: s3:// Azure: https://..core.windows.net/ Google: gs:// | -| backup.objectStore[0].endpointCA | object | `{"create":false,"enabled":false,"key":"","name":""}` | Specifies a CA bundle to validate a privately signed certificate. | +| backup.objectStore[0].endpointCA | object | `{"create":false,"key":"","name":""}` | Specifies a CA bundle to validate a privately signed certificate. | | backup.objectStore[0].endpointCA.create | bool | `false` | Creates a secret with the given value if true, otherwise uses an existing secret. | | backup.objectStore[0].endpointCredentials | string | `""` | Specifies secret that contains S3 credentials, should contain the keys ACCESS_KEY_ID and ACCESS_SECRET_KEY | | backup.objectStore[0].endpointURL | string | `"https://nyc3.digitaloceanspaces.com"` | Overrides the provider specific default endpoint. Defaults to: S3: https://s3..amazonaws.com" | @@ -85,7 +85,7 @@ Cloudnative-pg Cluster | nameOverride | string | `""` | Override the name of the cluster | | namespaceOverride | string | `""` | Override the namespace of the chart | | poolers | list | `[]` | List of PgBouncer poolers | -| recovery | object | `{"backup":{"backupName":"","database":"app","owner":"","pitrTarget":{"time":""}},"import":{"databases":[],"pgDumpExtraOptions":[],"pgRestoreExtraOptions":[],"postImportApplicationSQL":[],"roles":[],"schemaOnly":false,"source":{"database":"app","host":"","passwordSecret":{"create":false,"key":"password","name":"","value":""},"port":5432,"sslCertSecret":{"key":"","name":""},"sslKeySecret":{"key":"","name":""},"sslMode":"verify-full","sslRootCertSecret":{"key":"","name":""},"username":"app"},"type":"microservice"},"method":"backup","objectStore":{"clusterName":"","data":{"compression":"snappy","encryption":"","jobs":1},"database":"app","destinationPath":"","endpointCA":{"create":false,"enabled":false,"key":"","name":""},"endpointCredentials":"","endpointURL":"","index":1,"name":"recovery","owner":"","pitrTarget":{"time":""},"wal":{"compression":"snappy","encryption":"","maxParallel":1}},"pgBaseBackup":{"database":"app","owner":"","secret":"","source":{"database":"app","host":"","passwordSecret":{"create":false,"key":"password","name":"","value":""},"port":5432,"sslCertSecret":{"key":"","name":""},"sslKeySecret":{"key":"","name":""},"sslMode":"verify-full","sslRootCertSecret":{"key":"","name":""},"username":""}}}` | Recovery settings when booting cluster from external cluster | +| recovery | object | `{"backup":{"backupName":"","database":"app","owner":"","pitrTarget":{"time":""}},"import":{"databases":[],"pgDumpExtraOptions":[],"pgRestoreExtraOptions":[],"postImportApplicationSQL":[],"roles":[],"schemaOnly":false,"source":{"database":"app","host":"","passwordSecret":{"create":false,"key":"password","name":"","value":""},"port":5432,"sslCertSecret":{"key":"","name":""},"sslKeySecret":{"key":"","name":""},"sslMode":"verify-full","sslRootCertSecret":{"key":"","name":""},"username":"app"},"type":"microservice"},"method":"backup","objectStore":{"clusterName":"","data":{"compression":"snappy","encryption":"","jobs":1},"database":"app","destinationPath":"","endpointCA":{"create":false,"key":"","name":""},"endpointCredentials":"","endpointURL":"","index":1,"name":"recovery","owner":"","pitrTarget":{"time":""},"wal":{"compression":"snappy","encryption":"","maxParallel":1}},"pgBaseBackup":{"database":"app","owner":"","secret":"","source":{"database":"app","host":"","passwordSecret":{"create":false,"key":"password","name":"","value":""},"port":5432,"sslCertSecret":{"key":"","name":""},"sslKeySecret":{"key":"","name":""},"sslMode":"verify-full","sslRootCertSecret":{"key":"","name":""},"username":""}}}` | Recovery settings when booting cluster from external cluster | | recovery.backup.backupName | string | `""` | Name of the backup to recover from. | | recovery.backup.database | string | `"app"` | Name of the database used by the application. Default: `app`. | | recovery.backup.owner | string | `""` | Name of the owner of the database in the instance to be used by applications. Defaults to the value of the `database` key. | @@ -110,7 +110,7 @@ Cloudnative-pg Cluster | recovery.objectStore.data.jobs | int | `1` | Number of data files to be archived or restored in parallel. | | recovery.objectStore.database | string | `"app"` | Name of the database used by the application. Default: `app`. | | recovery.objectStore.destinationPath | string | `""` | Overrides the provider specific default path. Defaults to: S3: s3:// Azure: https://..core.windows.net/ Google: gs:// | -| recovery.objectStore.endpointCA | object | `{"create":false,"enabled":false,"key":"","name":""}` | Specifies a CA bundle to validate a privately signed certificate. | +| recovery.objectStore.endpointCA | object | `{"create":false,"key":"","name":""}` | Specifies a CA bundle to validate a privately signed certificate. | | recovery.objectStore.endpointCA.create | bool | `false` | Creates a secret with the given value if true, otherwise uses an existing secret. | | recovery.objectStore.endpointCredentials | string | `""` | Specifies secret that contains S3 credentials, should contain the keys ACCESS_KEY_ID and ACCESS_SECRET_KEY | | recovery.objectStore.endpointURL | string | `""` | Overrides the provider specific default endpoint. Defaults to: S3: https://s3..amazonaws.com" Leave empty if using the default S3 endpoint | diff --git a/charts/postgres-cluster/templates/object-store.yaml b/charts/postgres-cluster/templates/object-store.yaml index dbba003..7560d8f 100644 --- a/charts/postgres-cluster/templates/object-store.yaml +++ b/charts/postgres-cluster/templates/object-store.yaml @@ -14,7 +14,7 @@ spec: configuration: destinationPath: {{ .destinationPath }} endpointURL: {{ .endpointURL }} - {{ if .endpointCA.enabled }} + {{ if .endpointCA.name }} endpointCA: name: {{ .endpointCA.name }} key: {{ .endpointCA.key }} @@ -67,7 +67,7 @@ spec: configuration: destinationPath: {{ .Values.recovery.objectStore.destinationPath }} endpointURL: {{ .Values.recovery.objectStore.endpointURL }} - {{- if .Values.recovery.objectStore.endpointCA.enabled }} + {{- if .Values.recovery.objectStore.endpointCA.name }} endpointCA: name: {{ .Values.recovery.objectStore.endpointCA.name }} key: {{ .Values.recovery.objectStore.endpointCA.key }} diff --git a/charts/postgres-cluster/values.yaml b/charts/postgres-cluster/values.yaml index e69598e..fd5a134 100644 --- a/charts/postgres-cluster/values.yaml +++ b/charts/postgres-cluster/values.yaml @@ -275,8 +275,6 @@ recovery: # -- Specifies a CA bundle to validate a privately signed certificate. endpointCA: - enabled: false - # -- Creates a secret with the given value if true, otherwise uses an existing secret. create: false @@ -443,8 +441,6 @@ backup: # -- Specifies a CA bundle to validate a privately signed certificate. endpointCA: - enabled: false - # -- Creates a secret with the given value if true, otherwise uses an existing secret. create: false