matrix-media-repo: Handle missing pgsql port value

This commit is contained in:
Alexander Olofsson 2023-03-19 15:06:43 +01:00
parent 8b3ec66704
commit 17abe8c43a
No known key found for this signature in database
GPG key ID: D439C9470CB04C73

View file

@ -105,7 +105,11 @@ Set postgres port
*/}} */}}
{{- define "matrix-media-repo.postgresql.port" -}} {{- define "matrix-media-repo.postgresql.port" -}}
{{- if .Values.postgresql.enabled -}} {{- if .Values.postgresql.enabled -}}
{{- if .Values.postgresql.service -}}
{{- .Values.postgresql.service.port | default 5432 }} {{- .Values.postgresql.service.port | default 5432 }}
{{- else -}}
5432
{{- end -}}
{{- else -}} {{- else -}}
{{- required "A valid externalPostgresql.port is required" .Values.externalPostgresql.port -}} {{- required "A valid externalPostgresql.port is required" .Values.externalPostgresql.port -}}
{{- end -}} {{- end -}}