wormhole-explorer/devnet/mongo.yaml

76 lines
1.6 KiB
YAML
Raw Normal View History

2022-09-07 11:43:05 -07:00
---
apiVersion: v1
kind: Service
metadata:
name: mongo
labels:
app: mongo
spec:
clusterIP: None
selector:
app: mongo
ports:
- port: 27017
name: mongo
protocol: TCP
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mongo
spec:
selector:
matchLabels:
app: mongo
serviceName: mongo
replicas: 1
2022-09-07 11:43:05 -07:00
template:
metadata:
labels:
app: mongo
spec:
restartPolicy: Always
terminationGracePeriodSeconds: 0
containers:
- name: mongo
image: mongo:latest
command:
- mongod
- "--replSet"
- rs0
- "--bind_ip_all"
2022-09-07 11:43:05 -07:00
env:
- name: MONGO_INITDB_ROOT_USERNAME
value: root
- name: MONGO_INITDB_ROOT_PASSWORD
value: example
livenessProbe:
tcpSocket:
port: 27017
periodSeconds: 1
failureThreshold: 300
2022-09-07 11:43:05 -07:00
readinessProbe:
tcpSocket:
port: 27017
periodSeconds: 1
failureThreshold: 300
ports:
- containerPort: 27017
name: mongo
protocol: TCP
2022-09-18 14:54:51 -07:00
volumeMounts:
2022-09-25 18:49:40 -07:00
- name: wormhole-explorer-mongo-data-dir
2022-09-18 14:54:51 -07:00
mountPath: /data/db
volumeClaimTemplates:
- metadata:
name: wormhole-explorer-mongo-data-dir
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
limits:
cpu: 10m
memory: 50Mi
requests:
storage: 10Gi
cpu: 10m
memory: 50Mi