Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ArgoCD diff on postgresql keys #441

Merged
merged 11 commits into from
Dec 17, 2024
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
24 changes: 19 additions & 5 deletions charts/cluster/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ spec:
postgresGID: {{ include "cluster.postgresGID" . }}
storage:
size: {{ .Values.cluster.storage.size }}
{{- if not (empty .Values.cluster.storage.storageClass) }}
storageClass: {{ .Values.cluster.storage.storageClass }}
{{- 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 }}
{{- with .Values.cluster.resources }}
resources:
Expand All @@ -37,7 +41,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 @@ -52,27 +58,35 @@ spec:
name: {{ . }}
{{ end }}
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 }}
{{- 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
Loading