Skip to content

Commit

Permalink
fix breaks when external mongodb is used
Browse files Browse the repository at this point in the history
  • Loading branch information
bingwei-hong-partior committed Nov 25, 2022
1 parent 4963e14 commit d19dda0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions charts/litmus/templates/auth-server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ spec:
command: ["/bin/sh", "-c"]
args:
[
{{- if .Values.mongodb.enabled }}
"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'",
{{- else }}
"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'",
{{- end }}
]
resources:
{{- toYaml .Values.portal.server.waitForMongodb.resources | nindent 12 }}
Expand Down
6 changes: 5 additions & 1 deletion charts/litmus/templates/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ spec:
image: {{ .Values.image.imageRegistryName }}/{{ .Values.portal.server.waitForMongodb.image.repository }}:{{ .Values.portal.server.waitForMongodb.image.tag }}
imagePullPolicy: {{ .Values.portal.server.waitForMongodb.image.pullPolicy }}
command: ["/bin/sh", "-c"]
args:
args:
[
{{- if .Values.mongodb.enabled }}
"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'",
{{- else }}
"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'",
{{- end }}
]
resources:
{{- toYaml .Values.portal.server.waitForMongodb.resources | nindent 12 }}
Expand Down

0 comments on commit d19dda0

Please sign in to comment.