@@ -99,8 +99,8 @@ Get the full image name for supervisor
9999PostgreSQL hostname
100100*/} }
101101{ {- define " trigger-v4.postgres.hostname" -} }
102- { {- if .Values.postgres.host } }
103- { {- .Values.postgres.host } }
102+ { {- if .Values.postgres.external. host } }
103+ { {- .Values.postgres.external. host } }
104104{ {- else if .Values.postgres.deploy } }
105105{ {- printf " %s-postgres" .Release.Name } }
106106{ {- end } }
@@ -110,8 +110,8 @@ PostgreSQL hostname
110110PostgreSQL connection string
111111*/} }
112112{ {- define " trigger-v4.postgres.connectionString" -} }
113- { {- if .Values.postgres.host -} }
114- postgresql://{ { .Values.postgres.username } }:{ { .Values.postgres.password } }@{ { .Values.postgres.host } }:{ { .Values.postgres.port | default 5432 } }/{ { .Values.postgres.database } }?schema={ { .Values.postgres.schema | default " public" } }&sslmode={ { .Values.postgres.sslMode | default " prefer" } }
113+ { {- if .Values.postgres.external. host -} }
114+ postgresql://{ { .Values.postgres.external. username } }:{ { .Values.postgres.external. password } }@{ { .Values.postgres.external. host } }:{ { .Values.postgres.external. port | default 5432 } }/{ { .Values.postgres.external. database } }?schema={ { .Values.postgres.connection. schema | default " public" } }&sslmode={ { .Values.postgres.connection .sslMode | default " prefer" } }
115115{ {- else if .Values.postgres.deploy -} }
116116postgresql://{ { .Values.postgres.auth.username } }:{ { .Values.postgres.auth.password } }@{ { include " trigger-v4.postgres.hostname" . } }:5432/{ { .Values.postgres.auth.database } }?schema={ { .Values.postgres.connection.schema | default " public" } }&sslmode={ { .Values.postgres.connection.sslMode | default " prefer" } }
117117{ {- end -} }
@@ -121,8 +121,8 @@ postgresql://{{ .Values.postgres.auth.username }}:{{ .Values.postgres.auth.passw
121121Redis hostname
122122*/} }
123123{ {- define " trigger-v4.redis.hostname" -} }
124- { {- if .Values.redis.host } }
125- { {- .Values.redis.host } }
124+ { {- if .Values.redis.external. host } }
125+ { {- .Values.redis.external. host } }
126126{ {- else if .Values.redis.deploy } }
127127{ {- printf " %s-redis-master" .Release.Name } }
128128{ {- end } }
@@ -136,13 +136,35 @@ Redis connection details
136136{ {- end } }
137137
138138{ {- define " trigger-v4.redis.port" -} }
139- { {- if .Values.redis.host -} }
140- { { .Values.redis.port | default 6379 } }
139+ { {- if .Values.redis.external. host -} }
140+ { { .Values.redis.external. port | default 6379 } }
141141{ {- else if .Values.redis.deploy -} }
1421426379
143143{ {- end -} }
144144{ {- end } }
145145
146+ { {/*
147+ Redis password
148+ */} }
149+ { {- define " trigger-v4.redis.password" -} }
150+ { {- if .Values.redis.external.host -} }
151+ { { .Values.redis.external.password } }
152+ { {- else if .Values.redis.deploy -} }
153+ { { .Values.redis.auth.password } }
154+ { {- end -} }
155+ { {- end } }
156+
157+ { {/*
158+ Redis TLS disabled setting
159+ */} }
160+ { {- define " trigger-v4.redis.tlsDisabled" -} }
161+ { {- if .Values.redis.external.host -} }
162+ { { not (.Values.redis.external.tls.enabled | default false ) } }
163+ { {- else -} }
164+ { {- true -} }
165+ { {- end -} }
166+ { {- end } }
167+
146168{ {/*
147169Electric service URL
148170*/} }
@@ -248,8 +270,8 @@ Registry connection details
248270PostgreSQL host (for wait-for-it script)
249271*/} }
250272{ {- define " trigger-v4.postgres.host" -} }
251- { {- if .Values.postgres.host -} }
252- { { .Values.postgres.host } }:{ { .Values.postgres.port | default 5432 } }
273+ { {- if .Values.postgres.external. host -} }
274+ { { .Values.postgres.external. host } }:{ { .Values.postgres.external .port | default 5432 } }
253275{ {- else if .Values.postgres.deploy -} }
254276{ { include " trigger-v4.postgres.hostname" . } }:5432
255277{ {- end -} }
0 commit comments