Compare commits

..

11 Commits

Author SHA1 Message Date
d403cc4066 remove tensorchord option
Some checks failed
release-charts-postgres-cluster / release (push) Successful in 15s
renovate / renovate (push) Has been cancelled
2025-10-03 23:35:42 -05:00
da4a2acd8a fix context
All checks were successful
release-charts-postgres-cluster / release (push) Successful in 15s
renovate / renovate (push) Successful in 1m49s
2025-10-02 22:13:51 -05:00
ae3897832b add credential defaults
All checks were successful
release-charts-postgres-cluster / release (push) Successful in 41s
renovate / renovate (push) Successful in 1m7s
2025-10-02 22:10:08 -05:00
de2b30b476 chagne default backup behavior
All checks were successful
release-charts-postgres-cluster / release (push) Successful in 15s
renovate / renovate (push) Successful in 36s
2025-10-02 21:56:30 -05:00
58e380c9ea fix values
All checks were successful
release-charts-postgres-cluster / release (push) Successful in 15s
renovate / renovate (push) Successful in 39s
2025-10-02 21:41:55 -05:00
2dfa733e49 fix recovery config
All checks were successful
release-charts-postgres-cluster / release (push) Successful in 17s
renovate / renovate (push) Successful in 40s
2025-10-02 21:35:57 -05:00
227c0db540 remove bool for backups
All checks were successful
release-charts-postgres-cluster / release (push) Successful in 20s
renovate / renovate (push) Successful in 40s
2025-10-02 21:20:46 -05:00
e09e2ba56f fix recovery credentials
All checks were successful
release-charts-postgres-cluster / release (push) Successful in 17s
renovate / renovate (push) Successful in 59s
2025-10-02 21:05:38 -05:00
bf18a84ea2 fix if statement 2025-10-02 21:04:09 -05:00
01bcb37e45 use values explicitly
All checks were successful
release-charts-postgres-cluster / release (push) Successful in 22s
renovate / renovate (push) Successful in 1m15s
2025-10-02 21:01:53 -05:00
8e2f1d13e7 fix values
All checks were successful
release-charts-postgres-cluster / release (push) Successful in 17s
renovate / renovate (push) Successful in 37s
2025-10-02 20:51:01 -05:00
8 changed files with 22 additions and 59 deletions

View File

@@ -1,6 +1,6 @@
apiVersion: v2
name: postgres-cluster
version: 6.6.0
version: 6.10.0
description: Cloudnative-pg Cluster
keywords:
- database
@@ -11,4 +11,4 @@ sources:
maintainers:
- name: alexlebens
icon: https://avatars.githubusercontent.com/u/100373852?s=48&v=4
appVersion: v1.26.0
appVersion: v1.27.0

View File

@@ -1,6 +1,6 @@
# postgres-cluster
![Version: 6.6.0](https://img.shields.io/badge/Version-6.6.0-informational?style=flat-square) ![AppVersion: v1.26.0](https://img.shields.io/badge/AppVersion-v1.26.0-informational?style=flat-square)
![Version: 6.10.0](https://img.shields.io/badge/Version-6.10.0-informational?style=flat-square) ![AppVersion: v1.27.0](https://img.shields.io/badge/AppVersion-v1.27.0-informational?style=flat-square)
Cloudnative-pg Cluster
@@ -19,8 +19,7 @@ Cloudnative-pg Cluster
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| backup | object | `{"enabled":false,"method":"objectStore","objectStore":[],"scheduledBackups":[]}` | Backup settings |
| backup.enabled | bool | `false` | You need to configure backups manually, so backups are disabled by default. |
| backup | object | `{"method":"objectStore","objectStore":[],"scheduledBackups":[]}` | Backup settings |
| backup.method | string | `"objectStore"` | Method to create backups, options currently are only objectStore |
| backup.objectStore | list | `[]` | Options for object store backups |
| backup.scheduledBackups | list | `[]` | List of scheduled backups |

View File

@@ -11,21 +11,8 @@ bootstrap:
{{- if .Values.cluster.initdb.owner }}
owner: {{ tpl .Values.cluster.initdb.owner . }}
{{- end }}
{{- if eq .Values.type "tensorchord" }}
dataChecksums: true
{{- end }}
{{- if or (eq .Values.type "tensorchord") (.Values.cluster.initdb.postInitApplicationSQL) }}
{{- if (.Values.cluster.initdb.postInitApplicationSQL) }}
postInitApplicationSQL:
{{- if eq .Values.type "tensorchord" }}
- ALTER SYSTEM SET search_path TO "$user", public, vectors;
- SET search_path TO "$user", public, vectors;
- CREATE EXTENSION IF NOT EXISTS "vectors";
- CREATE EXTENSION IF NOT EXISTS "cube";
- CREATE EXTENSION IF NOT EXISTS "earthdistance";
- ALTER SCHEMA vectors OWNER TO "app";
- GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA vectors TO "app";
- GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "app";
{{- end }}
{{- with .Values.cluster.initdb }}
{{- range .postInitApplicationSQL }}
{{- printf "- %s" . | nindent 6 }}

View File

@@ -83,17 +83,3 @@ Generate recovery server name
{{- printf "%s-backup-%s" (include "cluster.name" .) (toString .Values.recovery.objectStore.index) | trunc 63 | trimSuffix "-" -}}
{{- end }}
{{- end }}
{{/*
Generate name for recovery object store credentials
*/}}
{{- define "cluster.recoveryCredentials" -}}
{{- printf "%s-cluster-backup-secret" (include "cluster.name" .) | trunc 63 | trimSuffix "-" -}}
{{- end }}
{{/*
Generate name for backup object store credentials
*/}}
{{- define "cluster.backupCredentials" -}}
{{- printf "%s-cluster-backup-secret" (include "cluster.name" .) | trunc 63 | trimSuffix "-" -}}
{{- end }}

View File

@@ -19,10 +19,8 @@ spec:
{{- end }}
postgresUID: {{ include "cluster.postgresUID" . }}
postgresGID: {{ include "cluster.postgresGID" . }}
{{ if or (eq .Values.backup.method "objectStore") (eq .Values.recovery.method "objectStore") }}
plugins:
{{ end }}
{{- range $objectStore := .Values.backup.objectStore }}
plugins:
- name: barman-cloud.cloudnative-pg.io
enabled: true
isWALArchiver: {{ $objectStore.isWALArchiver | default true }}
@@ -34,13 +32,14 @@ spec:
serverName: "{{ include "cluster.name" $ }}-backup-{{ $objectStore.index }}"
{{- end }}
{{- end }}
{{ if eq .Values.recovery.method "objectStore" }}
- name: barman-cloud.cloudnative-pg.io
enabled: true
isWALArchiver: false
parameters:
barmanObjectName: "{{ include "cluster.name" . }}-{{ .Values.recovery.objectStore.name }}"
serverName: {{ include "cluster.recoveryServerName" . }}
{{ if (eq .Values.recovery.method "objectStore") }}
externalClusters:
- name: recovery
plugin:
name: barman-cloud.cloudnative-pg.io
parameters:
barmanObjectName: "{{ include "cluster.name" . }}-{{ .Values.recovery.objectStore.name }}"
serverName: {{ include "cluster.recoveryServerName" . }}
{{ end }}
storage:
size: {{ .Values.cluster.storage.size }}
@@ -81,11 +80,8 @@ spec:
enablePDB: {{ .Values.cluster.enablePDB }}
postgresql:
{{- if or (eq .Values.type "tensorchord") (not (empty .Values.cluster.postgresql.shared_preload_libraries)) }}
{{- if .Values.cluster.postgresql.shared_preload_libraries }}
shared_preload_libraries:
{{- if eq .Values.type "tensorchord" }}
- vectors.so
{{- end }}
{{- with .Values.cluster.postgresql.shared_preload_libraries }}
{{- toYaml . | nindent 6 }}
{{- end }}

View File

@@ -1,4 +1,4 @@
{{ if and (.Values.backup.enabled) (eq .Values.backup.method "objectStore") }}
{{ if (eq .Values.backup.method "objectStore") }}
{{ $context := . -}}
{{ range .Values.backup.objectStore -}}
---
@@ -27,7 +27,7 @@ spec:
{{ end }}
maxParallel: {{ .wal.maxParallel | default "1" }}
{{- end }}
{{- if .wal }}
{{- if .data }}
data:
compression: {{ .data.compression | default "snappy" }}
{{- with .data.encryption }}
@@ -37,10 +37,10 @@ spec:
{{- end }}
s3Credentials:
accessKeyId:
name: {{ .endpointCredentials | default include "cluster.backupCredentials" $context }}
name: {{ .endpointCredentials | default (printf "%s-cluster-backup-secret" (include "cluster.name" $context) | trunc 63 | trimSuffix "-") }}
key: ACCESS_KEY_ID
secretAccessKey:
name: {{ .endpointCredentials | default include "cluster.backupCredentials" $context }}
name: {{ .endpointCredentials | default (printf "%s-cluster-backup-secret" (include "cluster.name" $context) | trunc 63 | trimSuffix "-") }}
key: ACCESS_SECRET_KEY
{{ end -}}
{{ end }}
@@ -77,9 +77,9 @@ spec:
jobs: {{ .Values.recovery.objectStore.data.jobs }}
s3Credentials:
accessKeyId:
name: {{ .Values.recovery.endpointCredentials | default include "cluster.recoveryCredentials" . }}
name: {{ .Values.recovery.objectStore.endpointCredentials | default (printf "%s-cluster-backup-secret" (include "cluster.name" .) | trunc 63 | trimSuffix "-") }}
key: ACCESS_KEY_ID
secretAccessKey:
name: {{ .Values.recovery.endpointCredentials | default include "cluster.recoveryCredentials" . }}
name: {{ .Values.recovery.objectStore.endpointCredentials | default (printf "%s-cluster-backup-secret" (include "cluster.name" .) | trunc 63 | trimSuffix "-") }}
key: ACCESS_SECRET_KEY
{{ end }}

View File

@@ -1,4 +1,3 @@
{{ if .Values.backup.enabled }}
{{ $context := . -}}
{{ range .Values.backup.scheduledBackups -}}
---
@@ -10,7 +9,7 @@ metadata:
labels:
{{- include "cluster.labels" $context | nindent 4 }}
spec:
immediate: {{ .immediate | default true }}
immediate: {{ .immediate | default false }}
suspend: {{ .suspend | default false }}
schedule: {{ .schedule | quote | required "Schedule is required" }}
backupOwnerReference: {{ .backupOwnerReference | default "self" }}
@@ -22,4 +21,3 @@ spec:
parameters:
barmanObjectName: "{{ include "cluster.name" $context }}-{{ .backupName }}-backup"
{{ end -}}
{{ end }}

View File

@@ -417,9 +417,6 @@ recovery:
# -- Backup settings
backup:
# -- You need to configure backups manually, so backups are disabled by default.
enabled: false
# -- Method to create backups, options currently are only objectStore
method: objectStore