Compare commits

..

1 Commits

Author SHA1 Message Date
8d743157f5 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 31s
2025-05-24 05:40:29 +00:00
6 changed files with 100 additions and 89 deletions

View File

@@ -1,6 +1,6 @@
apiVersion: v2 apiVersion: v2
name: postgres-cluster name: postgres-cluster
version: 6.2.0 version: 6.0.0
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.0](https://img.shields.io/badge/Version-6.2.0-informational?style=flat-square) ![AppVersion: v1.26.0](https://img.shields.io/badge/AppVersion-v1.26.0-informational?style=flat-square) ![Version: 6.0.0](https://img.shields.io/badge/Version-6.0.0-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":false,"method":"objectStore","objectStore":[{"clusterName":"","data":{"compression":"snappy","encryption":"","jobs":1},"destinationPath":"","endpointCA":{"create":false,"key":"","name":""},"endpointCredentials":"","endpointURL":"","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 | `false` | 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":"","endpointCA":{"create":false,"key":"","name":""},"endpointCredentials":"","endpointURL":"","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 | `""` | 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 | `""` | 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

@@ -26,9 +26,9 @@ spec:
{{ $context := . -}} {{ $context := . -}}
{{ range .Values.backup.objectStore -}} {{ range .Values.backup.objectStore -}}
- name: barman-cloud.cloudnative-pg.io - name: barman-cloud.cloudnative-pg.io
isWALArchiver: {{ .isWALArchiver }} isWALArchiver: {{ $context.isWALArchiver }}
parameters: parameters:
barmanObjectName: "{{ include "cluster.name" $context }}-{{ .name }}-backup" barmanObjectName: "{{ include "cluster.name" . }}-{{ $context.name }}-backup"
{{ end -}} {{ end -}}
{{ end }} {{ end }}
{{ if eq .Values.recovery.method "objectStore" }} {{ if eq .Values.recovery.method "objectStore" }}

View File

@@ -5,54 +5,50 @@
apiVersion: barmancloud.cnpg.io/v1 apiVersion: barmancloud.cnpg.io/v1
kind: ObjectStore kind: ObjectStore
metadata: metadata:
name: "{{ include "cluster.name" $context }}-{{ .name }}-backup" name: "{{ include "cluster.name" . }}-{{ $context.name }}-backup"
namespace: {{ include "cluster.namespace" $context }} namespace: {{ include "cluster.namespace" . }}
labels: labels:
{{- include "cluster.labels" $context | nindent 4 }} {{- include "cluster.labels" . | nindent 4 }}
spec: spec:
retentionPolicy: {{ .retentionPolicy | default "30d" }} retentionPolicy: {{ $context.retentionPolicy }}
configuration: configuration:
destinationPath: {{ .destinationPath | required "Destination path is required" }} destinationPath: {{ $context.destinationPath }}
endpointURL: {{ .endpointURL | default "https://nyc3.digitaloceanspaces.com" }} endpointURL: {{ $context.endpointURL }}
{{- if .endpointCA }} {{- if $context.endpointCA.name }}
endpointCA: endpointCA:
name: {{ .endpointCA.name }} name: {{ $context.endpointCA.name }}
key: {{ .endpointCA.key }} key: {{ $context.endpointCA.key }}
{{- end }} {{- end }}
{{- if .clusterName }} {{- if $context.clusterName }}
serverName: "{{ .clusterName }}-backup-{{ .index }}" serverName: "{{ $context.clusterName }}-backup-{{ $context.index }}"
{{- else }} {{- else }}
serverName: "{{ include "cluster.name" $context }}-backup-{{ .index }}" serverName: "{{ include "cluster.name" . }}-backup-{{ $context.index }}"
{{- end }} {{- end }}
{{- if .wal }}
wal: wal:
compression: {{ .wal.compression | default "snappy" }} compression: {{ $context.wal.compression }}
{{- with .wal.encryption }} {{- with $context.wal.encryption}}
encryption: {{ . }} encryption: {{ . }}
{{- end }} {{- end }}
maxParallel: {{ .wal.maxParallel | default 1 }} maxParallel: {{ $context.wal.maxParallel }}
{{- end }}
{{- if .wal }}
data: data:
compression: {{ .data.compression | default "snappy" }} compression: {{ $context.data.compression }}
{{- with .data.encryption }} {{- with $context.data.encryption }}
encryption: {{ . }} encryption: {{ . }}
{{- end }} {{- end }}
jobs: {{ .data.jobs | default 1 }} jobs: {{ $context.data.jobs }}
{{- end }}
s3Credentials: s3Credentials:
accessKeyId: accessKeyId:
{{- if .endpointCredentials }} {{- if $context.endpointCredentials }}
name: {{ .endpointCredentials }} name: {{ $context.endpointCredentials }}
{{- else }} {{- else }}
name: {{- printf "%s-backup-secret" (include "cluster.name" $context) | trunc 63 | trimSuffix "-" -}} name: {{- printf "%s-backup-secret" (include "cluster.name" .) | trunc 63 | trimSuffix "-" -}}
{{- end }} {{- end }}
key: ACCESS_KEY_ID key: ACCESS_KEY_ID
secretAccessKey: secretAccessKey:
{{- if .endpointCredentials }} {{- if $context.endpointCredentials }}
name: {{ .endpointCredentials }} name: {{ $context.endpointCredentials }}
{{- else }} {{- else }}
name: {{- printf "%s-backup-secret" (include "cluster.name" $context) | trunc 63 | trimSuffix "-" -}} name: {{- printf "%s-backup-secret" (include "cluster.name" .) | trunc 63 | trimSuffix "-" -}}
{{- end }} {{- end }}
key: ACCESS_SECRET_KEY key: ACCESS_SECRET_KEY
{{ end -}} {{ end -}}

View File

@@ -5,21 +5,21 @@
apiVersion: postgresql.cnpg.io/v1 apiVersion: postgresql.cnpg.io/v1
kind: ScheduledBackup kind: ScheduledBackup
metadata: metadata:
name: "{{ include "cluster.name" $context }}-{{ .name }}-scheduled-backup" name: {{ include "cluster.name" $context }}-{{ .name }}-scheduled-backup
namespace: {{ include "cluster.namespace" $context }} namespace: {{ include "cluster.namespace" $context }}
labels: labels:
{{- include "cluster.labels" $context | nindent 4 }} {{- include "cluster.labels" $context | nindent 4 }}
spec: spec:
immediate: true immediate: true
suspend: {{ .suspend }} suspend: {{ $context.suspend }}
schedule: {{ .schedule | quote }} schedule: {{ $context.schedule | quote }}
backupOwnerReference: {{ .backupOwnerReference }} backupOwnerReference: {{ $context.backupOwnerReference }}
cluster: cluster:
name: {{ include "cluster.name" $context }}-cluster name: {{ include "cluster.name" $context }}-cluster
method: plugin method: plugin
pluginConfiguration: pluginConfiguration:
name: {{ .plugin }} name: {{ $context.plugin }}
parameters: parameters:
barmanObjectName: "{{ include "cluster.name" $context }}-{{ .backupName }}-backup" barmanObjectName: "{{ include "cluster.name" . }}-{{ $context.backupName }}-backup"
{{ end -}} {{ end -}}
{{ end }} {{ end }}

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
@@ -275,9 +275,9 @@ recovery:
# -- Specifies a CA bundle to validate a privately signed certificate. # -- Specifies a CA bundle to validate a privately signed certificate.
endpointCA: endpointCA:
# -- Creates a secret with the given value if true, otherwise uses an existing secret. # -- Creates a secret with the given value if true, otherwise uses an existing secret.
create: false create: false
name: "" name: ""
key: "" key: ""
@@ -418,72 +418,70 @@ recovery:
backup: backup:
# -- You need to configure backups manually, so backups are disabled by default. # -- You need to configure backups manually, so backups are disabled by default.
enabled: true enabled: false
# -- Method to create backups, options currently are only objectStore # -- Method to create backups, options currently are only objectStore
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: ""
# # -- 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: "" # Leave empty if using the default S3 endpoint
# # 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
name: ""
key: ""
# # -- Specifies a CA bundle to validate a privately signed certificate. # -- Generate external cluster name, uses: {{ .Release.Name }}-postgresql-<major version>-backup-index-{{ index }}
# endpointCA: index: 1
# # -- Creates a secret with the given value if true, otherwise uses an existing secret.
# create: false
# name: "" # -- Override the name of the backup cluster, defaults to "cluster.name"
# key: "" clusterName: ""
# # -- Generate external cluster name, uses: {{ .Release.Name }}-postgresql-<major version>-backup-index-{{ index }} # -- Specifies secret that contains S3 credentials, should contain the keys ACCESS_KEY_ID and ACCESS_SECRET_KEY
# index: 1 endpointCredentials: ""
# # -- Override the name of the backup cluster, defaults to "cluster.name" # -- Retention policy for backups
# clusterName: "" retentionPolicy: "30d"
# # -- Specifies secret that contains S3 credentials, should contain the keys ACCESS_KEY_ID and ACCESS_SECRET_KEY # -- Specificies if this backup will do WALs
# endpointCredentials: "" isWALArchiver: true
# # -- Retention policy for backups # -- Storage
# retentionPolicy: "30d" wal:
# # -- Specificies if this backup will do WALs # -- WAL compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`.
# isWALArchiver: true compression: snappy
# # -- Storage # -- Whether to instruct the storage provider to encrypt WAL files. One of `` (use the storage container default), `AES256` or `aws:kms`.
# wal: encryption: ""
# # -- WAL compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. # -- Number of WAL files to be archived or restored in parallel.
# compression: snappy maxParallel: 1
# # -- Whether to instruct the storage provider to encrypt WAL files. One of `` (use the storage container default), `AES256` or `aws:kms`. data:
# encryption: "" # -- Data compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`.
compression: snappy
# # -- Number of WAL files to be archived or restored in parallel. # -- Whether to instruct the storage provider to encrypt data files. One of `` (use the storage container default), `AES256` or `aws:kms`.
# maxParallel: 1 encryption: ""
# data: # -- Number of data files to be archived or restored in parallel.
# # -- Data compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. jobs: 1
# compression: snappy
# # -- 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: 1
scheduledBackups: scheduledBackups:
- -