Skip to content

Commit

Permalink
updated mongo image tags
Browse files Browse the repository at this point in the history
Signed-off-by: Saranya-jena <[email protected]>
  • Loading branch information
Saranya-jena committed Sep 28, 2023
1 parent 7bf069b commit 75f8d1f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
9 changes: 7 additions & 2 deletions charts/litmus/templates/auth-server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:
{{- end }}
initContainers:
- name: wait-for-mongodb
image: mongo:latest
image: {{ .Values.portal.server.waitForMongodb.image.repository }}:{{ .Values.portal.server.waitForMongodb.image.tag }}
imagePullPolicy: {{ .Values.portal.server.waitForMongodb.image.pullPolicy }}
command: ["/bin/bash", "-c"]
env:
Expand Down Expand Up @@ -66,9 +66,14 @@ spec:
name: {{ include "litmus-portal.secretname" . }}
key: DB_USER
{{- end }}
- name: DB_SERVER
valueFrom:
configMapKeyRef:
name: {{ include "litmus-portal.fullname" . }}-admin-config
key: DB_SERVER
args:
[
"until mongosh -u ${DB_USER} -p ${DB_PASSWORD} {{ include "litmus-portal.mongodbConnectionString" . }} --eval 'rs.status()' | grep 'ok' &> /dev/null; do sleep 5; echo 'Waiting for the MongoDB to be ready...'; done; echo 'Connection with MongoDB established'",
"until [[ $(mongosh -u ${DB_USER} -p ${DB_PASSWORD} ${DB_SERVER} --eval 'rs.status()' | grep 'ok' | wc -l) -eq 1 ]]; do sleep 5; echo 'Waiting for the MongoDB to be ready...'; done; echo 'Connection with MongoDB established'",
]
resources:
{{- toYaml .Values.portal.server.waitForMongodb.resources | nindent 12 }}
Expand Down
9 changes: 7 additions & 2 deletions charts/litmus/templates/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
{{- toYaml .Values.portal.server.graphqlServer.volumes | default "" | nindent 8 }}
initContainers:
- name: wait-for-mongodb
image: mongo:latest
image: {{ .Values.portal.server.waitForMongodb.image.repository }}:{{ .Values.portal.server.waitForMongodb.image.tag }}
imagePullPolicy: {{ .Values.portal.server.waitForMongodb.image.pullPolicy }}
command: ["/bin/bash", "-c"]
env:
Expand Down Expand Up @@ -65,9 +65,14 @@ spec:
name: {{ include "litmus-portal.secretname" . }}
key: DB_USER
{{- end }}
- name: DB_SERVER
valueFrom:
configMapKeyRef:
name: {{ include "litmus-portal.fullname" . }}-admin-config
key: DB_SERVER
args:
[
"until [[ $(mongosh -u ${DB_USER} -p ${DB_PASSWORD} {{ include "litmus-portal.mongodbConnectionString" . }} --eval 'rs.status()' | grep 'ok' | wc -l) -eq 1 ]]; do sleep 5; echo 'Waiting for the MongoDB to be ready...'; done; echo 'Connection with MongoDB established'",
"until [[ $(mongosh -u ${DB_USER} -p ${DB_PASSWORD} ${DB_SERVER} --eval 'rs.status()' | grep 'ok' | wc -l) -eq 1 ]]; do sleep 5; echo 'Waiting for the MongoDB to be ready...'; done; echo 'Connection with MongoDB established'",
]
resources:
{{- toYaml .Values.portal.server.waitForMongodb.resources | nindent 12 }}
Expand Down
8 changes: 4 additions & 4 deletions charts/litmus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ adminConfig:
VERSION: "ci"
SKIP_SSL_VERIFY: "false"
# -- leave empty if uses Mongo DB deployed by this chart
DBPASSWORD: "1234"
DBUSER: "root"
DBPASSWORD: ""
DBUSER: ""
DB_SERVER: ""
DB_PORT: ""
ADMIN_USERNAME: "admin"
Expand Down Expand Up @@ -165,8 +165,8 @@ portal:
# my.company.com/tier: "backend"
waitForMongodb:
image:
repository: curl
tag: ci
repository: mongo
tag: 6
pullPolicy: "Always"
securityContext:
{}
Expand Down

0 comments on commit 75f8d1f

Please sign in to comment.