-
Notifications
You must be signed in to change notification settings - Fork 128
/
mongodb-enterprise-multi-cluster.yaml
307 lines (306 loc) · 7.89 KB
/
mongodb-enterprise-multi-cluster.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
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
---
# Source: enterprise-operator/templates/operator-roles.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: mongodb-enterprise-operator-mongodb-webhook
rules:
- apiGroups:
- "admissionregistration.k8s.io"
resources:
- validatingwebhookconfigurations
verbs:
- get
- create
- update
- delete
- apiGroups:
- ""
resources:
- services
verbs:
- get
- list
- watch
- create
- update
- delete
---
# Source: enterprise-operator/templates/operator-roles.yaml
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: mongodb-enterprise-operator-multi-cluster-mongodb-webhook-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: mongodb-enterprise-operator-mongodb-webhook
subjects:
- kind: ServiceAccount
name: mongodb-enterprise-operator-multi-cluster
namespace: mongodb
---
# Source: enterprise-operator/templates/operator-roles.yaml
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: mongodb-enterprise-operator-multi-cluster
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
- delete
- deletecollection
- apiGroups:
- mongodb.com
verbs:
- '*'
resources:
- mongodb
- mongodb/finalizers
- mongodbusers
- mongodbusers/finalizers
- opsmanagers
- opsmanagers/finalizers
- mongodbmulticluster
- mongodbmulticluster/finalizers
- mongodb/status
- mongodbusers/status
- opsmanagers/status
- mongodbmulticluster/status
- apiGroups:
- ''
resources:
- persistentvolumeclaims
verbs:
- get
- delete
- list
- watch
- patch
- update
---
# Source: enterprise-operator/templates/operator-roles.yaml
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: mongodb-enterprise-operator-multi-cluster
namespace: mongodb
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: mongodb-enterprise-operator-multi-cluster
subjects:
- kind: ServiceAccount
name: mongodb-enterprise-operator-multi-cluster
namespace: mongodb
---
# Source: enterprise-operator/templates/database-roles.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: mongodb-enterprise-appdb
namespace: mongodb
---
# Source: enterprise-operator/templates/database-roles.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: mongodb-enterprise-database-pods
namespace: mongodb
---
# Source: enterprise-operator/templates/database-roles.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: mongodb-enterprise-ops-manager
namespace: mongodb
---
# Source: 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: 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: enterprise-operator/templates/operator-sa.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: mongodb-enterprise-operator-multi-cluster
namespace: mongodb
---
# Source: enterprise-operator/templates/operator.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: mongodb-enterprise-operator-multi-cluster
namespace: mongodb
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/component: controller
app.kubernetes.io/name: mongodb-enterprise-operator-multi-cluster
app.kubernetes.io/instance: mongodb-enterprise-operator-multi-cluster
template:
metadata:
labels:
app.kubernetes.io/component: controller
app.kubernetes.io/name: mongodb-enterprise-operator-multi-cluster
app.kubernetes.io/instance: mongodb-enterprise-operator-multi-cluster
spec:
serviceAccountName: mongodb-enterprise-operator-multi-cluster
securityContext:
runAsNonRoot: true
runAsUser: 2000
containers:
- name: mongodb-enterprise-operator-multi-cluster
image: "quay.io/mongodb/mongodb-enterprise-operator-ubi:1.29.0"
imagePullPolicy: Always
args:
- -watch-resource=mongodb
- -watch-resource=opsmanagers
- -watch-resource=mongodbusers
- -watch-resource=mongodbmulticluster
command:
- /usr/local/bin/mongodb-enterprise-operator
volumeMounts:
- mountPath: /etc/config/kubeconfig
name: kube-config-volume
resources:
limits:
cpu: 1100m
memory: 1Gi
requests:
cpu: 500m
memory: 200Mi
env:
- name: OPERATOR_ENV
value: prod
- name: MDB_DEFAULT_ARCHITECTURE
value: non-static
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: CLUSTER_CLIENT_TIMEOUT
value: "10"
- name: IMAGE_PULL_POLICY
value: Always
# Database
- name: MONGODB_ENTERPRISE_DATABASE_IMAGE
value: quay.io/mongodb/mongodb-enterprise-database-ubi
- name: INIT_DATABASE_IMAGE_REPOSITORY
value: quay.io/mongodb/mongodb-enterprise-init-database-ubi
- name: INIT_DATABASE_VERSION
value: 1.29.0
- name: DATABASE_VERSION
value: 1.29.0
# Ops Manager
- name: OPS_MANAGER_IMAGE_REPOSITORY
value: quay.io/mongodb/mongodb-enterprise-ops-manager-ubi
- name: INIT_OPS_MANAGER_IMAGE_REPOSITORY
value: quay.io/mongodb/mongodb-enterprise-init-ops-manager-ubi
- name: INIT_OPS_MANAGER_VERSION
value: 1.29.0
# AppDB
- name: INIT_APPDB_IMAGE_REPOSITORY
value: quay.io/mongodb/mongodb-enterprise-init-appdb-ubi
- name: INIT_APPDB_VERSION
value: 1.29.0
- name: OPS_MANAGER_IMAGE_PULL_POLICY
value: Always
- name: AGENT_IMAGE
value: "quay.io/mongodb/mongodb-agent-ubi:107.0.0.8502-1"
- name: MDB_AGENT_IMAGE_REPOSITORY
value: "quay.io/mongodb/mongodb-agent-ubi"
- name: MONGODB_IMAGE
value: mongodb-enterprise-server
- name: MONGODB_REPO_URL
value: quay.io/mongodb
- name: MDB_IMAGE_TYPE
value: ubi8
- name: PERFORM_FAILOVER
value: 'true'
- name: MDB_MAX_CONCURRENT_RECONCILES
value: "1"
volumes:
- name: kube-config-volume
secret:
defaultMode: 420
secretName: mongodb-enterprise-operator-multi-cluster-kubeconfig