Compare commits
5 Commits
postgres-c
...
postgres-c
| Author | SHA1 | Date | |
|---|---|---|---|
| d403cc4066 | |||
| da4a2acd8a | |||
| ae3897832b | |||
| de2b30b476 | |||
| 58e380c9ea |
@@ -1,6 +1,6 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
name: postgres-cluster
|
name: postgres-cluster
|
||||||
version: 6.8.0
|
version: 6.10.0
|
||||||
description: Cloudnative-pg Cluster
|
description: Cloudnative-pg Cluster
|
||||||
keywords:
|
keywords:
|
||||||
- database
|
- database
|
||||||
@@ -11,4 +11,4 @@ sources:
|
|||||||
maintainers:
|
maintainers:
|
||||||
- name: alexlebens
|
- name: alexlebens
|
||||||
icon: https://avatars.githubusercontent.com/u/100373852?s=48&v=4
|
icon: https://avatars.githubusercontent.com/u/100373852?s=48&v=4
|
||||||
appVersion: v1.26.0
|
appVersion: v1.27.0
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# postgres-cluster
|
# postgres-cluster
|
||||||
|
|
||||||
 
|
 
|
||||||
|
|
||||||
Cloudnative-pg Cluster
|
Cloudnative-pg Cluster
|
||||||
|
|
||||||
|
|||||||
@@ -11,21 +11,8 @@ bootstrap:
|
|||||||
{{- if .Values.cluster.initdb.owner }}
|
{{- if .Values.cluster.initdb.owner }}
|
||||||
owner: {{ tpl .Values.cluster.initdb.owner . }}
|
owner: {{ tpl .Values.cluster.initdb.owner . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if eq .Values.type "tensorchord" }}
|
{{- if (.Values.cluster.initdb.postInitApplicationSQL) }}
|
||||||
dataChecksums: true
|
|
||||||
{{- end }}
|
|
||||||
{{- if or (eq .Values.type "tensorchord") (.Values.cluster.initdb.postInitApplicationSQL) }}
|
|
||||||
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 }}
|
{{- with .Values.cluster.initdb }}
|
||||||
{{- range .postInitApplicationSQL }}
|
{{- range .postInitApplicationSQL }}
|
||||||
{{- printf "- %s" . | nindent 6 }}
|
{{- printf "- %s" . | nindent 6 }}
|
||||||
|
|||||||
@@ -83,17 +83,3 @@ Generate recovery server name
|
|||||||
{{- printf "%s-backup-%s" (include "cluster.name" .) (toString .Values.recovery.objectStore.index) | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-backup-%s" (include "cluster.name" .) (toString .Values.recovery.objectStore.index) | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- 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 }}
|
|
||||||
|
|||||||
@@ -19,10 +19,8 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
postgresUID: {{ include "cluster.postgresUID" . }}
|
postgresUID: {{ include "cluster.postgresUID" . }}
|
||||||
postgresGID: {{ include "cluster.postgresGID" . }}
|
postgresGID: {{ include "cluster.postgresGID" . }}
|
||||||
{{ if (eq .Values.backup.method "objectStore") }}
|
|
||||||
plugins:
|
|
||||||
{{ end }}
|
|
||||||
{{- range $objectStore := .Values.backup.objectStore }}
|
{{- range $objectStore := .Values.backup.objectStore }}
|
||||||
|
plugins:
|
||||||
- name: barman-cloud.cloudnative-pg.io
|
- name: barman-cloud.cloudnative-pg.io
|
||||||
enabled: true
|
enabled: true
|
||||||
isWALArchiver: {{ $objectStore.isWALArchiver | default true }}
|
isWALArchiver: {{ $objectStore.isWALArchiver | default true }}
|
||||||
@@ -34,7 +32,7 @@ spec:
|
|||||||
serverName: "{{ include "cluster.name" $ }}-backup-{{ $objectStore.index }}"
|
serverName: "{{ include "cluster.name" $ }}-backup-{{ $objectStore.index }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ if eq .Values.recovery.method "objectStore" }}
|
{{ if (eq .Values.recovery.method "objectStore") }}
|
||||||
externalClusters:
|
externalClusters:
|
||||||
- name: recovery
|
- name: recovery
|
||||||
plugin:
|
plugin:
|
||||||
@@ -82,11 +80,8 @@ spec:
|
|||||||
enablePDB: {{ .Values.cluster.enablePDB }}
|
enablePDB: {{ .Values.cluster.enablePDB }}
|
||||||
|
|
||||||
postgresql:
|
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:
|
shared_preload_libraries:
|
||||||
{{- if eq .Values.type "tensorchord" }}
|
|
||||||
- vectors.so
|
|
||||||
{{- end }}
|
|
||||||
{{- with .Values.cluster.postgresql.shared_preload_libraries }}
|
{{- with .Values.cluster.postgresql.shared_preload_libraries }}
|
||||||
{{- toYaml . | nindent 6 }}
|
{{- toYaml . | nindent 6 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -37,10 +37,10 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
s3Credentials:
|
s3Credentials:
|
||||||
accessKeyId:
|
accessKeyId:
|
||||||
name: {{ .endpointCredentials }}
|
name: {{ .endpointCredentials | default (printf "%s-cluster-backup-secret" (include "cluster.name" $context) | trunc 63 | trimSuffix "-") }}
|
||||||
key: ACCESS_KEY_ID
|
key: ACCESS_KEY_ID
|
||||||
secretAccessKey:
|
secretAccessKey:
|
||||||
name: {{ .endpointCredentials }}
|
name: {{ .endpointCredentials | default (printf "%s-cluster-backup-secret" (include "cluster.name" $context) | trunc 63 | trimSuffix "-") }}
|
||||||
key: ACCESS_SECRET_KEY
|
key: ACCESS_SECRET_KEY
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -77,9 +77,9 @@ spec:
|
|||||||
jobs: {{ .Values.recovery.objectStore.data.jobs }}
|
jobs: {{ .Values.recovery.objectStore.data.jobs }}
|
||||||
s3Credentials:
|
s3Credentials:
|
||||||
accessKeyId:
|
accessKeyId:
|
||||||
name: {{ .Values.recovery.objectStore.endpointCredentials }}
|
name: {{ .Values.recovery.objectStore.endpointCredentials | default (printf "%s-cluster-backup-secret" (include "cluster.name" .) | trunc 63 | trimSuffix "-") }}
|
||||||
key: ACCESS_KEY_ID
|
key: ACCESS_KEY_ID
|
||||||
secretAccessKey:
|
secretAccessKey:
|
||||||
name: {{ .Values.recovery.objectStore.endpointCredentials }}
|
name: {{ .Values.recovery.objectStore.endpointCredentials | default (printf "%s-cluster-backup-secret" (include "cluster.name" .) | trunc 63 | trimSuffix "-") }}
|
||||||
key: ACCESS_SECRET_KEY
|
key: ACCESS_SECRET_KEY
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
{{- include "cluster.labels" $context | nindent 4 }}
|
{{- include "cluster.labels" $context | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
immediate: {{ .immediate | default true }}
|
immediate: {{ .immediate | default false }}
|
||||||
suspend: {{ .suspend | default false }}
|
suspend: {{ .suspend | default false }}
|
||||||
schedule: {{ .schedule | quote | required "Schedule is required" }}
|
schedule: {{ .schedule | quote | required "Schedule is required" }}
|
||||||
backupOwnerReference: {{ .backupOwnerReference | default "self" }}
|
backupOwnerReference: {{ .backupOwnerReference | default "self" }}
|
||||||
|
|||||||
Reference in New Issue
Block a user