Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dev/390
Browse files Browse the repository at this point in the history
Signed-off-by: Itay Grudev <[email protected]>
  • Loading branch information
itay-grudev committed Dec 17, 2024
2 parents 9667a18 + a366a33 commit 0e208b4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
2 changes: 2 additions & 0 deletions charts/cluster/templates/_bootstrap.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ bootstrap:
{{- if .Values.cluster.initdb.owner }}
owner: {{ tpl .Values.cluster.initdb.owner . }}
{{- end }}
{{- if or (eq .Values.type "postgis") (eq .Values.type "timescaledb") (not (empty .Values.cluster.initdb.postInitApplicationSQL)) }}
postInitApplicationSQL:
{{- if eq .Values.type "postgis" }}
- CREATE EXTENSION IF NOT EXISTS postgis;
Expand All @@ -24,6 +25,7 @@ bootstrap:
{{- printf "- %s" . | nindent 6 }}
{{- end -}}
{{- end -}}
{{- end }}
{{- else if eq .Values.mode "recovery" -}}
bootstrap:
{{- if eq .Values.recovery.method "pg_basebackup" }}
Expand Down
30 changes: 22 additions & 8 deletions charts/cluster/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ spec:
postgresGID: {{ include "cluster.postgresGID" . }}
storage:
size: {{ .Values.cluster.storage.size }}
{{- if not (empty .Values.cluster.storage.storageClass) }}
storageClass: {{ .Values.cluster.storage.storageClass }}
{{- if .Values.cluster.walStorage.enabled }}
{{- end }}
{{- if .Values.cluster.walStorage.enabled }}
walStorage:
size: {{ .Values.cluster.walStorage.size }}
{{- if not (empty .Values.cluster.walStorage.storageClass) }}
storageClass: {{ .Values.cluster.walStorage.storageClass }}
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.cluster.resources }}
resources:
{{- toYaml . | nindent 4 }}
Expand All @@ -38,7 +42,9 @@ spec:
affinity:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.cluster.priorityClassName }}
priorityClassName: {{ .Values.cluster.priorityClassName }}
{{- end }}

primaryUpdateMethod: {{ .Values.cluster.primaryUpdateMethod }}
primaryUpdateStrategy: {{ .Values.cluster.primaryUpdateStrategy }}
Expand All @@ -54,31 +60,39 @@ spec:
{{ end }}
enablePDB: {{ .Values.cluster.enablePDB }}
postgresql:
{{- if or (eq .Values.type "timescaledb") (not (empty .Values.cluster.postgresql.shared_preload_libraries)) }}
shared_preload_libraries:
{{- if eq .Values.type "timescaledb" }}
- timescaledb
{{- end }}
{{- with .Values.cluster.postgresql.shared_preload_libraries }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.cluster.postgresql }}
{{- end }}
{{- with .Values.cluster.postgresql.pg_hba }}
pg_hba:
{{- toYaml .pg_hba | nindent 6 }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.cluster.postgresql.pg_ident }}
pg_ident:
{{- toYaml .pg_ident | nindent 6 }}
{{- with .synchronous }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.cluster.postgresql.synchronous }}
synchronous:
{{- toYaml . | nindent 6 }}
{{ end }}
{{- with .Values.cluster.postgresql.parameters }}
parameters:
{{- toYaml .parameters | nindent 6 }}
{{ end }}
{{- toYaml . | nindent 6 }}
{{- end }}

{{- if not (empty .Values.cluster.roles) }}
managed:
{{- with .Values.cluster.roles }}
roles:
{{- toYaml . | nindent 6 }}
{{ end }}
{{- end }}

{{- with .Values.cluster.serviceAccountTemplate }}
serviceAccountTemplate:
Expand Down

0 comments on commit 0e208b4

Please sign in to comment.