From 17abe8c43a1a550354de3aa2fc1c448d7765f1e5 Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Sun, 19 Mar 2023 15:06:43 +0100 Subject: [PATCH] matrix-media-repo: Handle missing pgsql port value --- charts/matrix-media-repo/templates/_helpers.tpl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/charts/matrix-media-repo/templates/_helpers.tpl b/charts/matrix-media-repo/templates/_helpers.tpl index 9e70321..4a768e5 100644 --- a/charts/matrix-media-repo/templates/_helpers.tpl +++ b/charts/matrix-media-repo/templates/_helpers.tpl @@ -105,7 +105,11 @@ Set postgres port */}} {{- define "matrix-media-repo.postgresql.port" -}} {{- if .Values.postgresql.enabled -}} +{{- if .Values.postgresql.service -}} {{- .Values.postgresql.service.port | default 5432 }} +{{- else -}} +5432 +{{- end -}} {{- else -}} {{- required "A valid externalPostgresql.port is required" .Values.externalPostgresql.port -}} {{- end -}}