Skip to content

Commit d19dda0

Browse files
fix breaks when external mongodb is used
1 parent 4963e14 commit d19dda0

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

charts/litmus/templates/auth-server-deployment.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ spec:
4242
command: ["/bin/sh", "-c"]
4343
args:
4444
[
45+
{{- if .Values.mongodb.enabled }}
4546
"while [[ $(curl -sw '%{http_code}' http://{{ include "litmus-portal.mongodbServiceName" . }}:{{ .Values.mongodb.service.ports.mongodb }} -o /dev/null) -ne 200 ]]; do sleep 5; echo 'Waiting for the MongoDB to be ready...'; done; echo 'Connection with MongoDB established'",
47+
{{- else }}
48+
"while [[ $(curl -sw '%{http_code}' http://{{ include "litmus-portal.mongodbServiceName" . }}:{{ .Values.adminConfig.DB_PORT }} -o /dev/null) -ne 200 ]]; do sleep 5; echo 'Waiting for the MongoDB to be ready...'; done; echo 'Connection with MongoDB established'",
49+
{{- end }}
4650
]
4751
resources:
4852
{{- toYaml .Values.portal.server.waitForMongodb.resources | nindent 12 }}

charts/litmus/templates/server-deployment.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,13 @@ spec:
3939
image: {{ .Values.image.imageRegistryName }}/{{ .Values.portal.server.waitForMongodb.image.repository }}:{{ .Values.portal.server.waitForMongodb.image.tag }}
4040
imagePullPolicy: {{ .Values.portal.server.waitForMongodb.image.pullPolicy }}
4141
command: ["/bin/sh", "-c"]
42-
args:
42+
args:
4343
[
44+
{{- if .Values.mongodb.enabled }}
4445
"while [[ $(curl -sw '%{http_code}' http://{{ include "litmus-portal.mongodbServiceName" . }}:{{ .Values.mongodb.service.ports.mongodb }} -o /dev/null) -ne 200 ]]; do sleep 5; echo 'Waiting for the MongoDB to be ready...'; done; echo 'Connection with MongoDB established'",
46+
{{- else }}
47+
"while [[ $(curl -sw '%{http_code}' http://{{ include "litmus-portal.mongodbServiceName" . }}:{{ .Values.adminConfig.DB_PORT }} -o /dev/null) -ne 200 ]]; do sleep 5; echo 'Waiting for the MongoDB to be ready...'; done; echo 'Connection with MongoDB established'",
48+
{{- end }}
4549
]
4650
resources:
4751
{{- toYaml .Values.portal.server.waitForMongodb.resources | nindent 12 }}

0 commit comments

Comments
 (0)