From c7fb6a3f10867ede2cbb3e806d363796086fa6e2 Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Tue, 24 Jun 2025 11:18:28 +0100 Subject: [PATCH] support wait-for-it.sh --- hosting/k8s/helm/templates/_helpers.tpl | 11 +++++++++++ hosting/k8s/helm/templates/webapp.yaml | 2 ++ 2 files changed, 13 insertions(+) diff --git a/hosting/k8s/helm/templates/_helpers.tpl b/hosting/k8s/helm/templates/_helpers.tpl index 4578a578f..1679cbef0 100644 --- a/hosting/k8s/helm/templates/_helpers.tpl +++ b/hosting/k8s/helm/templates/_helpers.tpl @@ -171,6 +171,17 @@ localhost:5000 {{- end -}} {{- end }} +{{/* +PostgreSQL host (for wait-for-it script) +*/}} +{{- define "trigger-v4.postgres.host" -}} +{{- if .Values.postgres.external -}} +{{ .Values.postgres.externalConnection.host }}:{{ .Values.postgres.externalConnection.port }} +{{- else -}} +{{ include "trigger-v4.fullname" . }}-postgres:{{ .Values.postgres.primary.service.ports.postgres }} +{{- end -}} +{{- end }} + {{/* Supervisor connection details */}} diff --git a/hosting/k8s/helm/templates/webapp.yaml b/hosting/k8s/helm/templates/webapp.yaml index f9ab1a18d..fec06cd3d 100644 --- a/hosting/k8s/helm/templates/webapp.yaml +++ b/hosting/k8s/helm/templates/webapp.yaml @@ -77,6 +77,8 @@ spec: value: {{ include "trigger-v4.postgres.connectionString" . | quote }} - name: DIRECT_URL value: {{ include "trigger-v4.postgres.connectionString" . | quote }} + - name: DATABASE_HOST + value: {{ include "trigger-v4.postgres.host" . | quote }} - name: REDIS_HOST value: {{ include "trigger-v4.redis.host" . | quote }} - name: REDIS_PORT