From 0bfb29772e9544f366e097dce739000cfc091bf3 Mon Sep 17 00:00:00 2001 From: apriebeAVSystem Date: Thu, 19 Sep 2024 18:34:24 +0200 Subject: [PATCH] feat(cluster): Allowing a templated (tpl) cluster.initdb.owner value. (#346) Utilized the tpl function to evaluate the owner string as a template inside the Helm template. --------- Signed-off-by: apriebeAVSystem Co-authored-by: Itay Grudev --- charts/cluster/templates/_bootstrap.tpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/charts/cluster/templates/_bootstrap.tpl b/charts/cluster/templates/_bootstrap.tpl index 81665d2e2..aea7d9429 100644 --- a/charts/cluster/templates/_bootstrap.tpl +++ b/charts/cluster/templates/_bootstrap.tpl @@ -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;