Skip to content

Commit

Permalink
feat(cluster): Allowing a templated (tpl) cluster.initdb.owner value. (
Browse files Browse the repository at this point in the history
…#346)

Utilized the tpl function to evaluate the owner string as a template inside the Helm template.

---------

Signed-off-by: apriebeAVSystem <[email protected]>
Co-authored-by: Itay Grudev <[email protected]>
  • Loading branch information
apriebeAVSystem and itay-grudev authored Sep 19, 2024
1 parent 3680ee5 commit 0bfb297
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion charts/cluster/templates/_bootstrap.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
bootstrap:
initdb:
{{- with .Values.cluster.initdb }}
{{- with (omit . "postInitApplicationSQL") }}
{{- with (omit . "postInitApplicationSQL" "owner") }}
{{- . | toYaml | nindent 4 }}
{{- end }}
{{- end }}
{{- if .Values.cluster.initdb.owner }}
owner: {{ tpl .Values.cluster.initdb.owner . }}
{{- end }}
postInitApplicationSQL:
{{- if eq .Values.type "postgis" }}
- CREATE EXTENSION IF NOT EXISTS postgis;
Expand Down

0 comments on commit 0bfb297

Please sign in to comment.