mongo-deployment.yaml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. annotations:
  5. kompose.cmd: kompose convert
  6. kompose.version: 1.34.0 (cbf2835db)
  7. labels:
  8. io.kompose.service: mongo
  9. name: mongo
  10. namespace: sharelatex
  11. spec:
  12. replicas: 1
  13. selector:
  14. matchLabels:
  15. io.kompose.service: mongo
  16. strategy:
  17. type: Recreate
  18. template:
  19. metadata:
  20. annotations:
  21. kompose.cmd: kompose convert
  22. kompose.version: 1.34.0 (cbf2835db)
  23. labels:
  24. io.kompose.service: mongo
  25. spec:
  26. containers:
  27. - args:
  28. - --replSet
  29. - overleaf
  30. env:
  31. - name: MONGO_INITDB_DATABASE
  32. value: sharelatex
  33. image: mongo:8.0
  34. livenessProbe:
  35. exec:
  36. command:
  37. - echo 'db.stats().ok' | mongosh localhost:27017/test --quiet
  38. failureThreshold: 5
  39. periodSeconds: 10
  40. timeoutSeconds: 10
  41. name: mongo
  42. volumeMounts:
  43. - mountPath: /data/db
  44. name: mongo-claim0
  45. - mountPath: /docker-entrypoint-initdb.d/mongodb-init-replica-set.js
  46. name: mongo-claim1
  47. restartPolicy: Always
  48. volumes:
  49. - name: mongo-claim0
  50. persistentVolumeClaim:
  51. claimName: mongo-claim0
  52. - name: mongo-claim1
  53. persistentVolumeClaim:
  54. claimName: mongo-claim1