Skip to content

Commit

Permalink
BC-7240 - next fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mamutmk5 authored Jun 27, 2024
1 parent 08d0c8b commit a8e3e11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ansible/roles/mongo-repset/templates/init-configmap.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ data:
do
sleep 1
done
mongosh $MONGODB_URI --eval 'rs.initiate({"_id" : "rs0", "members" : [{"_id" : 0, "host" : "mongodb-0:27017"},{"_id" : 0, "host" : "mongodb-1:27017"},{"_id" : 0, "host" : "mongodb-2:27017"}]})'
mongosh $MONGODB_URI --eval 'rs.initiate({"_id" : "rs0", "members" : [{"_id" : 0, "host" : "mongodb-0.mongo-svc:27017"},{"_id" : 0, "host" : "mongodb-1.mongo-svc:27017"},{"_id" : 0, "host" : "mongodb-2.mongo-svc:27017"}]})'
sleep 30
if [[ $(mongosh --quiet --eval "db.isMaster().setName") != rs0 ]]
then
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/mongo-repset/templates/statefulset.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ spec:
app.kubernetes.io/managed-by: ansible
git.repo: {{ DOIDO_MONGO_REPO_NAME }}
spec:
serviceName: mongo-svc
containers:
- name: mongo
image: {{ MONGO_IMAGE_NAME }}:{{ MONGO_IMAGE_TAG }}
Expand Down

0 comments on commit a8e3e11

Please sign in to comment.