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 -}}