-
Notifications
You must be signed in to change notification settings - Fork 0
/
mongodb-deployment.yaml
47 lines (47 loc) · 1.13 KB
/
mongodb-deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: restheart-mongo
name: restheart-mongo
spec:
replicas: 1
selector:
matchLabels:
app: restheart-mongo
strategy:
type: Recreate
template:
metadata:
labels:
app: restheart-mongo
spec:
containers:
- args:
- --auth
- --replSet
- rs0
env:
- name: MONGO_INITDB_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: restheart-mongodb-secret
key: password
- name: MONGO_INITDB_ROOT_USERNAME
valueFrom:
secretKeyRef:
name: restheart-mongodb-secret
key: username
image: mongo:4.2
name: restheart-mongo
ports:
- containerPort: 27017
volumeMounts:
- mountPath: /data/db
name: restheart-mongo-volume
restartPolicy: Always
volumes:
- name: restheart-mongo-volume
persistentVolumeClaim:
claimName: restheart-mongo-volume
status: {}