Compare commits

..

1 Commits

Author SHA1 Message Date
5a3e67103f Update ghcr.io/cloudnative-pg/postgresql Docker tag to v17.5-standard-bullseye
Some checks failed
lint-and-test-charts / lint-test (pull_request) Failing after 16s
2025-05-24 07:00:26 +00:00
5 changed files with 77 additions and 65 deletions

View File

@@ -1,6 +1,6 @@
apiVersion: v2 apiVersion: v2
name: postgres-cluster name: postgres-cluster
version: 6.2.1 version: 6.1.1
description: Cloudnative-pg Cluster description: Cloudnative-pg Cluster
keywords: keywords:
- database - database

View File

@@ -1,6 +1,6 @@
# postgres-cluster # postgres-cluster
![Version: 6.2.1](https://img.shields.io/badge/Version-6.2.1-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 Cloudnative-pg Cluster
@@ -19,10 +19,27 @@ Cloudnative-pg Cluster
| Key | Type | Default | Description | | Key | Type | Default | Description |
|-----|------|---------|-------------| |-----|------|---------|-------------|
| backup | object | `{"enabled":true,"method":"objectStore","objectStore":[],"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.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.method | string | `"objectStore"` | Method to create backups, options currently are only objectStore |
| backup.objectStore | list | `[]` | 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://<bucket><path> Azure: https://<storageAccount>.<serviceName>.core.windows.net/<containerName><path> Google: gs://<bucket><path> |
| 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.<region>.amazonaws.com" |
| backup.objectStore[0].index | int | `1` | Generate external cluster name, uses: {{ .Release.Name }}-postgresql-<major version>-backup-index-{{ index }} |
| backup.objectStore[0].isWALArchiver | bool | `true` | Specificies if this backup will do WALs |
| backup.objectStore[0].name | string | `"external"` | Object store backup name |
| backup.objectStore[0].retentionPolicy | string | `"30d"` | Retention policy for backups |
| backup.objectStore[0].wal | object | `{"compression":"snappy","encryption":"","maxParallel":1}` | Storage |
| backup.objectStore[0].wal.compression | string | `"snappy"` | WAL compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. |
| backup.objectStore[0].wal.encryption | string | `""` | Whether to instruct the storage provider to encrypt WAL files. One of `` (use the storage container default), `AES256` or `aws:kms`. |
| backup.objectStore[0].wal.maxParallel | int | `1` | Number of WAL files to be archived or restored in parallel. |
| backup.scheduledBackups[0].backupName | string | `"external"` | Name of backup target | | backup.scheduledBackups[0].backupName | string | `"external"` | Name of backup target |
| backup.scheduledBackups[0].backupOwnerReference | string | `"self"` | Backup owner reference | | backup.scheduledBackups[0].backupOwnerReference | string | `"self"` | Backup owner reference |
| backup.scheduledBackups[0].name | string | `"daily-backup"` | Scheduled backup name | | backup.scheduledBackups[0].name | string | `"daily-backup"` | Scheduled backup name |

View File

@@ -19,7 +19,7 @@ spec:
{{- end }} {{- end }}
postgresUID: {{ include "cluster.postgresUID" . }} postgresUID: {{ include "cluster.postgresUID" . }}
postgresGID: {{ include "cluster.postgresGID" . }} postgresGID: {{ include "cluster.postgresGID" . }}
{{ if or (eq .Values.backup.method "objectStore") (eq .Values.recovery.method "objectStore") }} {{ if or (and (.Values.backup.enabled) (eq .Values.backup.method "objectStore")) (eq .Values.recovery.method "objectStore") }}
plugins: plugins:
{{ end }} {{ end }}
{{ if and (.Values.backup.enabled) (eq .Values.backup.method "objectStore") }} {{ if and (.Values.backup.enabled) (eq .Values.backup.method "objectStore") }}

View File

@@ -10,39 +10,35 @@ metadata:
labels: labels:
{{- include "cluster.labels" $context | nindent 4 }} {{- include "cluster.labels" $context | nindent 4 }}
spec: spec:
retentionPolicy: {{ .retentionPolicy | default "30d" }} retentionPolicy: {{ .retentionPolicy }}
configuration: configuration:
destinationPath: {{ .destinationPath | required "Destination path is required" }} destinationPath: {{ .destinationPath }}
endpointURL: {{ .endpointURL | default "https://nyc3.digitaloceanspaces.com" }} endpointURL: {{ .endpointURL }}
{{- if .endpointCA }} {{ if .endpointCA.name }}
endpointCA: endpointCA:
name: {{ .endpointCA.name }} name: {{ .endpointCA.name }}
key: {{ .endpointCA.key }} key: {{ .endpointCA.key }}
{{- end }} {{ end }}
{{- if .clusterName }} {{- if .clusterName }}
serverName: "{{ .clusterName }}-backup-{{ .index }}" serverName: "{{ .clusterName }}-backup-{{ .index }}"
{{- else }} {{- else }}
serverName: "{{ include "cluster.name" $context }}-backup-{{ .index }}" serverName: "{{ include "cluster.name" $context }}-backup-{{ .index }}"
{{- end }} {{- end }}
{{- if .wal }}
wal: wal:
compression: {{ .wal.compression | default "snappy" }} compression: {{ .wal.compression }}
{{- with .wal.encryption }} {{- with .wal.encryption}}
encryption: {{ . }} encryption: {{ . }}
{{- end }} {{- end }}
maxParallel: {{ .wal.maxParallel | default 1 }} maxParallel: {{ .wal.maxParallel }}
{{- end }}
{{- if .wal }}
data: data:
compression: {{ .data.compression | default "snappy" }} compression: {{ .data.compression }}
{{- with .data.encryption }} {{- with .data.encryption }}
encryption: {{ . }} encryption: {{ . }}
{{- end }} {{- end }}
jobs: {{ .data.jobs | default 1 }} jobs: {{ .data.jobs }}
{{- end }}
s3Credentials: s3Credentials:
accessKeyId: accessKeyId:
{{- if .endpointCredentials }} {{- if not (empty .endpointCredentials) }}
name: {{ .endpointCredentials }} name: {{ .endpointCredentials }}
{{- else }} {{- else }}
name: {{- printf "%s-backup-secret" (include "cluster.name" $context) | trunc 63 | trimSuffix "-" -}} name: {{- printf "%s-backup-secret" (include "cluster.name" $context) | trunc 63 | trimSuffix "-" -}}

View File

@@ -21,7 +21,7 @@ cluster:
# -- Default image # -- Default image
image: image:
repository: ghcr.io/cloudnative-pg/postgresql repository: ghcr.io/cloudnative-pg/postgresql
tag: "17.5-1-bullseye" tag: "17.5-standard-bullseye"
# -- Image pull policy. One of Always, Never or IfNotPresent. If not defined, it defaults to IfNotPresent. Cannot be updated. # -- Image pull policy. One of Always, Never or IfNotPresent. If not defined, it defaults to IfNotPresent. Cannot be updated.
# More info: https://kubernetes.io/docs/concepts/containers/images#updating-images # More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
@@ -424,66 +424,65 @@ backup:
method: objectStore method: objectStore
# -- Options for object store backups # -- Options for object store backups
objectStore: [] objectStore:
-
# -- Object store backup name
name: external
# - # -- Overrides the provider specific default path. Defaults to:
# # -- Object store backup name # S3: s3://<bucket><path>
# name: external # Azure: https://<storageAccount>.<serviceName>.core.windows.net/<containerName><path>
# Google: gs://<bucket><path>
destinationPath: s3://postgres-backups
# # -- Overrides the provider specific default path. Defaults to: # -- Overrides the provider specific default endpoint. Defaults to:
# # S3: s3://<bucket><path> # S3: https://s3.<region>.amazonaws.com"
# # Azure: https://<storageAccount>.<serviceName>.core.windows.net/<containerName><path> endpointURL: https://nyc3.digitaloceanspaces.com
# # Google: gs://<bucket><path>
# destinationPath: ""
# # -- Overrides the provider specific default endpoint. Defaults to: # -- Specifies a CA bundle to validate a privately signed certificate.
# # https://nyc3.digitaloceanspaces.com endpointCA:
# endpointURL: "" # -- Creates a secret with the given value if true, otherwise uses an existing secret.
create: false
# # -- Specifies a CA bundle to validate a privately signed certificate. name: ""
# endpointCA: key: ""
# # -- Creates a secret with the given value if true, otherwise uses an existing secret.
# create: false
# name: "" # -- Generate external cluster name, uses: {{ .Release.Name }}-postgresql-<major version>-backup-index-{{ index }}
# key: "" index: 1
# # -- Generate external cluster name, uses: {{ .Release.Name }}-postgresql-<major version>-backup-index-{{ index }} # -- Override the name of the backup cluster, defaults to "cluster.name"
# index: 1 clusterName: ""
# # -- Override the name of the backup cluster, defaults to "cluster.name" # -- Specifies secret that contains S3 credentials, should contain the keys ACCESS_KEY_ID and ACCESS_SECRET_KEY
# clusterName: "" endpointCredentials: ""
# # -- Specifies secret that contains S3 credentials, should contain the keys ACCESS_KEY_ID and ACCESS_SECRET_KEY # -- Retention policy for backups
# endpointCredentials: "" retentionPolicy: "30d"
# # -- Retention policy for backups # -- Specificies if this backup will do WALs
# retentionPolicy: "30d" isWALArchiver: true
# # -- Specificies if this backup will do WALs # -- Storage
# isWALArchiver: true wal:
# # -- Storage # -- WAL compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`.
# wal: compression: snappy
# # -- WAL compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. # -- Whether to instruct the storage provider to encrypt WAL files. One of `` (use the storage container default), `AES256` or `aws:kms`.
# compression: snappy encryption: ""
# # -- Whether to instruct the storage provider to encrypt WAL files. One of `` (use the storage container default), `AES256` or `aws:kms`. # -- Number of WAL files to be archived or restored in parallel.
# encryption: "" maxParallel: 1
# # -- Number of WAL files to be archived or restored in parallel. data:
# maxParallel: 1 # -- Data compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`.
compression: snappy
# data: # -- Whether to instruct the storage provider to encrypt data files. One of `` (use the storage container default), `AES256` or `aws:kms`.
# # -- Data compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. encryption: ""
# compression: snappy
# # -- Whether to instruct the storage provider to encrypt data files. One of `` (use the storage container default), `AES256` or `aws:kms`. # -- Number of data files to be archived or restored in parallel.
# encryption: "" jobs: 1
# # -- Number of data files to be archived or restored in parallel.
# jobs: 1
scheduledBackups: scheduledBackups:
- -