about summary refs log tree commit diff
path: root/chart/templates
diff options
context:
space:
mode:
authorCees-Jan Kiewiet <ceesjank@gmail.com>2022-11-13 12:06:03 -0800
committerGitHub <noreply@github.com>2022-11-13 21:06:03 +0100
commitad66bbed6291fa1cd3aee21e184d3ec7610688fa (patch)
tree4348844aca2f70d910cdda352696a5641a54b147 /chart/templates
parent82c663300a90f83ac2ff0f3652fd536caac2364f (diff)
Add the option to configure external postgresql port (#20370)
While the normal assumption of port `5432` for a postgresql server is pretty reliable I found that DigitalOcean puts them on a somewhat random port. This adds the ability to specify the port in the helm chart.
Diffstat (limited to 'chart/templates')
-rw-r--r--chart/templates/configmap-env.yaml3
1 files changed, 2 insertions, 1 deletions
diff --git a/chart/templates/configmap-env.yaml b/chart/templates/configmap-env.yaml
index 82a6a31e4..5d0b96db8 100644
--- a/chart/templates/configmap-env.yaml
+++ b/chart/templates/configmap-env.yaml
@@ -7,12 +7,13 @@ metadata:
 data:
   {{- if .Values.postgresql.enabled }}
   DB_HOST: {{ template "mastodon.postgresql.fullname" . }}
+  DB_PORT: "5432"
   {{- else }}
   DB_HOST: {{ .Values.postgresql.postgresqlHostname }}
+  DB_PORT: {{ .Values.postgresql.postgresqlPort | default "5432" | quote }}
   {{- end }}
   DB_NAME: {{ .Values.postgresql.auth.database }}
   DB_POOL: {{ .Values.mastodon.sidekiq.concurrency | quote }}
-  DB_PORT: "5432"
   DB_USER: {{ .Values.postgresql.auth.username }}
   DEFAULT_LOCALE: {{ .Values.mastodon.locale }}
   {{- if .Values.elasticsearch.enabled }}