diff options
author | terminaldweller <thabogre@gmail.com> | 2021-11-02 02:11:15 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2021-11-02 02:11:15 +0000 |
commit | 14da00b30d18b2728d16fc12d6a2a374d9cc27be (patch) | |
tree | 43d27b41566989ab2bf9b2c497d60f4f82c42f2e /kubernetes/mongodb/mongodb-deployment.yaml | |
parent | updates (diff) | |
download | scripts-14da00b30d18b2728d16fc12d6a2a374d9cc27be.tar.gz scripts-14da00b30d18b2728d16fc12d6a2a374d9cc27be.zip |
updates
Diffstat (limited to 'kubernetes/mongodb/mongodb-deployment.yaml')
-rw-r--r-- | kubernetes/mongodb/mongodb-deployment.yaml | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/kubernetes/mongodb/mongodb-deployment.yaml b/kubernetes/mongodb/mongodb-deployment.yaml index 778fd60..2002146 100644 --- a/kubernetes/mongodb/mongodb-deployment.yaml +++ b/kubernetes/mongodb/mongodb-deployment.yaml @@ -17,6 +17,38 @@ spec: containers: - name: mongodb image: mongo:4.4.10 + livenessProbe: + exec: + command: + - mongo + - --disableImplicitSessions + - --eval + - "db.adminCommand('ping')" + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 6 + readinessProbe: + exec: + command: + - mongo + - --disableImplicitSessions + - --eval + - "db.adminCommand('ping')" + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 6 + command: + - mongod + - --config + - /etc/mongod.conf/mongod.conf + - --noauth + - --dbpath + - /data/db + - --bind_ip_all ports: - containerPort: 27017 - containerPort: 27018 @@ -33,12 +65,18 @@ spec: name: mongodb-secrets key: mongodb-root-password volumeMounts: - - mountPath: /data/db - name: mongo-data + - name: mongo-data + mountPath: /data/db + - name: mongo-conf + mountPath: /etc/mongod.conf + readOnly: true volumes: - name: mongo-data persistentVolumeClaim: claimName: mongo-data + - name: mongo-conf + configMap: + name: mongodb-config-file --- apiVersion: v1 kind: Service |