-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathmongo-persistent-csi.yaml
More file actions
137 lines (137 loc) · 3.36 KB
/
mongo-persistent-csi.yaml
File metadata and controls
137 lines (137 loc) · 3.36 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
apiVersion: v1
kind: List
items:
- kind: Namespace
apiVersion: v1
metadata:
name: mongo-persistent
labels:
app: todolist-mongo-go
- apiVersion: v1
kind: ServiceAccount
metadata:
name: mongo-persistent-sa
namespace: mongo-persistent
labels:
component: mongo-persistent
- kind: SecurityContextConstraints
apiVersion: security.openshift.io/v1
metadata:
name: mongo-persistent-scc
allowPrivilegeEscalation: true
allowPrivilegedContainer: true
runAsUser:
type: RunAsAny
seLinuxContext:
type: RunAsAny
fsGroup:
type: RunAsAny
supplementalGroups:
type: RunAsAny
volumes:
- '*'
users:
- system:admin
- system:serviceaccount:mongo-persistent:mongo-persistent-sa
- apiVersion: v1
kind: Service
metadata:
name: todolist
namespace: mongo-persistent
labels:
app: todolist
service: todolist
e2e-app: "true"
spec:
ports:
- name: web
port: 8000
targetPort: 8000
selector:
app: todolist
service: todolist
- apiVersion: apps/v1
kind: Deployment
metadata:
name: todolist
namespace: mongo-persistent
labels:
app: todolist
service: todolist
e2e-app: "true"
spec:
replicas: 1
selector:
matchLabels:
app: todolist
service: todolist
strategy:
type: Recreate
template:
metadata:
labels:
app: todolist
service: todolist
e2e-app: "true"
spec:
serviceAccountName: mongo-persistent-sa
containers:
- name: todolist
image: quay.io/migtools/oadp-ci-todo2-go-testing-mongodb:latest
securityContext:
privileged: false
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
env:
- name: DB_BACKEND
value: mongodb
- name: MONGO_DATABASE
value: todolist
ports:
- containerPort: 8000
protocol: TCP
resources:
limits:
memory: 512Mi
volumeMounts:
- name: mongo-data
mountPath: /var/lib/mongodb
startupProbe:
httpGet:
path: /healthz
port: 8000
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 10
successThreshold: 1
failureThreshold: 60
livenessProbe:
httpGet:
path: /healthz
port: 8000
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /healthz
port: 8000
initialDelaySeconds: 10
periodSeconds: 5
volumes:
- name: mongo-data
persistentVolumeClaim:
claimName: mongo
- apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: todolist-route
namespace: mongo-persistent
spec:
path: "/"
to:
kind: Service
name: todolist