From dceedabcf287ef080f0b9e674fd893396848a3ef Mon Sep 17 00:00:00 2001 From: outductor Date: Sat, 13 Jan 2024 21:05:44 +0900 Subject: [PATCH] update mongo --- .../growi-system/mongodb/statefulset.yaml | 36 ++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/seichi-onp-k8s/manifests/seichi-kubernetes/apps/growi-system/mongodb/statefulset.yaml b/seichi-onp-k8s/manifests/seichi-kubernetes/apps/growi-system/mongodb/statefulset.yaml index a69a779ae..0773a0dba 100644 --- a/seichi-onp-k8s/manifests/seichi-kubernetes/apps/growi-system/mongodb/statefulset.yaml +++ b/seichi-onp-k8s/manifests/seichi-kubernetes/apps/growi-system/mongodb/statefulset.yaml @@ -15,7 +15,35 @@ spec: app: mongodb spec: containers: - - name: mongodb - image: mongo:6.0 - ports: - - containerPort: 27017 + - name: mongodb + image: mongo:6.0 + ports: + - containerPort: 27017 + volumeMounts: + - name: mongo-data + mountPath: /data/db + livenessProbe: + exec: + command: + - mongo + - --eval + - "db.adminCommand('ping')" + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + exec: + command: + - mongo + - --eval + - "db.adminCommand('ping')" + initialDelaySeconds: 5 + periodSeconds: 10 + volumeClaimTemplates: + - metadata: + name: mongo-data + spec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 20Gi