Skip to content

Commit c7fb6a3

Browse files
committed
support wait-for-it.sh
1 parent bff80c1 commit c7fb6a3

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

hosting/k8s/helm/templates/_helpers.tpl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,17 @@ localhost:5000
171171
{{- end -}}
172172
{{- end }}
173173

174+
{{/*
175+
PostgreSQL host (for wait-for-it script)
176+
*/}}
177+
{{- define "trigger-v4.postgres.host" -}}
178+
{{- if .Values.postgres.external -}}
179+
{{ .Values.postgres.externalConnection.host }}:{{ .Values.postgres.externalConnection.port }}
180+
{{- else -}}
181+
{{ include "trigger-v4.fullname" . }}-postgres:{{ .Values.postgres.primary.service.ports.postgres }}
182+
{{- end -}}
183+
{{- end }}
184+
174185
{{/*
175186
Supervisor connection details
176187
*/}}

hosting/k8s/helm/templates/webapp.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ spec:
7777
value: {{ include "trigger-v4.postgres.connectionString" . | quote }}
7878
- name: DIRECT_URL
7979
value: {{ include "trigger-v4.postgres.connectionString" . | quote }}
80+
- name: DATABASE_HOST
81+
value: {{ include "trigger-v4.postgres.host" . | quote }}
8082
- name: REDIS_HOST
8183
value: {{ include "trigger-v4.redis.host" . | quote }}
8284
- name: REDIS_PORT

0 commit comments

Comments
 (0)