forked from mongodb/mongodb-enterprise-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmongodb-enterprise-openshift.yaml
279 lines (278 loc) · 7 KB
/
mongodb-enterprise-openshift.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
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
---
# Source: mongodb-enterprise-operator/templates/operator-roles.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: mongodb-enterprise-operator
namespace: mongodb
---
# Source: mongodb-enterprise-operator/templates/operator-roles.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: mongodb-enterprise-operator-mongodb-certs
rules:
- apiGroups:
- certificates.k8s.io
resources:
- certificatesigningrequests
verbs:
- get
- create
- list
- watch
---
# Source: mongodb-enterprise-operator/templates/operator-roles.yaml
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: mongodb-enterprise-operator-mongodb-webhook-binding
namespace: mongodb
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: mongodb-enterprise-operator-mongodb-webhook
subjects:
- kind: ServiceAccount
name: mongodb-enterprise-operator
namespace: mongodb
---
# Source: mongodb-enterprise-operator/templates/operator-roles.yaml
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: mongodb-enterprise-operator-mongodb-certs-binding
namespace: mongodb
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: mongodb-enterprise-operator-mongodb-certs
subjects:
- kind: ServiceAccount
name: mongodb-enterprise-operator
namespace: mongodb
---
# Source: mongodb-enterprise-operator/templates/operator-roles.yaml
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: mongodb-enterprise-operator
namespace: mongodb
rules:
- apiGroups:
- ""
resources:
- services
verbs:
- get
- list
- watch
- create
- update
- delete
- apiGroups:
- ""
resources:
- secrets
- configmaps
verbs:
- get
- list
- create
- update
- delete
- watch
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- create
- get
- list
- watch
- delete
- update
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- apiGroups:
- mongodb.com
resources:
- mongodb
- mongodb/finalizers
- mongodbusers
- opsmanagers
- opsmanagers/finalizers
- mongodb/status
- mongodbusers/status
- opsmanagers/status
verbs:
- "*"
# This ClusterRoleBinding is necessary in order to use validating
# webhooks—these will prevent you from applying a variety of invalid resource
# definitions. The validating webhooks are optional so this can be removed if
# necessary.
---
# Source: mongodb-enterprise-operator/templates/operator-roles.yaml
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: mongodb-enterprise-operator
namespace: mongodb
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: mongodb-enterprise-operator
subjects:
- kind: ServiceAccount
name: mongodb-enterprise-operator
namespace: mongodb
# This ClusterRole is needed if the user wants to use the Kubernetes CA
# infrastructure to generate certificates.
---
# Source: mongodb-enterprise-operator/templates/database-roles.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: mongodb-enterprise-appdb
namespace: mongodb
---
# Source: mongodb-enterprise-operator/templates/database-roles.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: mongodb-enterprise-database-pods
namespace: mongodb
---
# Source: mongodb-enterprise-operator/templates/database-roles.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: mongodb-enterprise-ops-manager
namespace: mongodb
---
# Source: mongodb-enterprise-operator/templates/database-roles.yaml
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: mongodb-enterprise-appdb
namespace: mongodb
rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- apiGroups:
- ""
resources:
- pods
verbs:
- patch
- delete
- get
---
# Source: mongodb-enterprise-operator/templates/database-roles.yaml
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: mongodb-enterprise-appdb
namespace: mongodb
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: mongodb-enterprise-appdb
subjects:
- kind: ServiceAccount
name: mongodb-enterprise-appdb
namespace: mongodb
---
# Source: mongodb-enterprise-operator/templates/operator.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: mongodb-enterprise-operator
namespace: mongodb
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/component: controller
app.kubernetes.io/name: mongodb-enterprise-operator
app.kubernetes.io/instance: mongodb-enterprise-operator
template:
metadata:
labels:
app.kubernetes.io/component: controller
app.kubernetes.io/name: mongodb-enterprise-operator
app.kubernetes.io/instance: mongodb-enterprise-operator
spec:
serviceAccountName: mongodb-enterprise-operator
containers:
- name: mongodb-enterprise-operator
image: registry.connect.redhat.com/mongodb/enterprise-operator:1.12.0
imagePullPolicy: Always
args:
- "-watch-resource=mongodb"
- "-watch-resource=opsmanagers"
- "-watch-resource=mongodbusers"
command:
- "/usr/local/bin/mongodb-enterprise-operator"
resources:
limits:
cpu: 1100m
memory: 1Gi
requests:
cpu: 500m
memory: 200Mi
env:
- name: OPERATOR_ENV
value: prod
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: CURRENT_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: MANAGED_SECURITY_CONTEXT
value: 'true'
- name: IMAGE_PULL_POLICY
value: Always
# Database
- name: MONGODB_ENTERPRISE_DATABASE_IMAGE
value: registry.connect.redhat.com/mongodb/enterprise-database
- name: INIT_DATABASE_IMAGE_REPOSITORY
value: registry.connect.redhat.com/mongodb/mongodb-enterprise-init-database
- name: INIT_DATABASE_VERSION
value: 1.0.4
- name: DATABASE_VERSION
value: 2.0.1
# Ops Manager
- name: OPS_MANAGER_IMAGE_REPOSITORY
value: registry.connect.redhat.com/mongodb/mongodb-enterprise-ops-manager
- name: INIT_OPS_MANAGER_IMAGE_REPOSITORY
value: registry.connect.redhat.com/mongodb/mongodb-enterprise-init-ops-manager
- name: INIT_OPS_MANAGER_VERSION
value: 1.0.5
# AppDB
- name: INIT_APPDB_IMAGE_REPOSITORY
value: registry.connect.redhat.com/mongodb/mongodb-enterprise-init-appdb
- name: INIT_APPDB_VERSION
value: 1.0.8
- name: OPS_MANAGER_IMAGE_PULL_POLICY
value: Always
- name: AGENT_IMAGE
value: "registry.connect.redhat.com/mongodb/mongodb-agent:11.0.5.6963-1"
- name: MONGODB_IMAGE
value: mongodb-enterprise-appdb-database
- name: MONGODB_REPO_URL
value: quay.io/mongodb