aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/mongodb/mongodb-deployment.yaml
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2021-11-02 02:11:15 +0000
committerterminaldweller <thabogre@gmail.com>2021-11-02 02:11:15 +0000
commit14da00b30d18b2728d16fc12d6a2a374d9cc27be (patch)
tree43d27b41566989ab2bf9b2c497d60f4f82c42f2e /kubernetes/mongodb/mongodb-deployment.yaml
parentupdates (diff)
downloadscripts-14da00b30d18b2728d16fc12d6a2a374d9cc27be.tar.gz
scripts-14da00b30d18b2728d16fc12d6a2a374d9cc27be.zip
updates
Diffstat (limited to 'kubernetes/mongodb/mongodb-deployment.yaml')
-rw-r--r--kubernetes/mongodb/mongodb-deployment.yaml42
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