forked from l7mp/stunner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjitsi-server.yaml
475 lines (468 loc) · 11.1 KB
/
jitsi-server.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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
# Configmaps
apiVersion: v1
kind: ConfigMap
metadata:
name: prosody-common
labels:
app.kubernetes.io/name: jitsi-meet
app.kubernetes.io/instance: jitsi
data:
ENABLE_AUTH: "0"
ENABLE_GUESTS: "1"
ENABLE_P2P: "0"
PUBLIC_URL: "https://<public-ingress-ip>.nip.io" # TODO: Change this
TURN_ENABLE: "true"
TURN_HOST: "<stunner-public-ip>" # TODO: Change this
TURN_PORT: "3478"
TURN_CREDENTIALS: "my-shared-secret"
TURN_TRANSPORT: "udp"
JICOFO_AUTH_USER: "focus"
XMPP_DOMAIN: <public-ingress-ip>.nip.io
XMPP_MUC_DOMAIN: muc.<public-ingress-ip>.nip.io
XMPP_AUTH_DOMAIN: auth.<public-ingress-ip>.nip.io
XMPP_GUEST_DOMAIN: guest.<public-ingress-ip>.nip.io
XMPP_RECORDER_DOMAIN: recorder.<public-ingress-ip>.nip.io
XMPP_INTERNAL_MUC_DOMAIN: internal-muc.<public-ingress-ip>.nip.io
ENABLE_XMPP_WEBSOCKET: "1"
ENABLE_COLIBRI_WEBSOCKET: "1"
XMPP_MUC_MODULES: "external_services"
TZ: 'UTC'
LOG_LEVEL: 'info'
---
apiVersion: v1
kind: ConfigMap
metadata:
name: jitsi-meet
labels:
app.kubernetes.io/name: jitsi-meet
app.kubernetes.io/instance: jitsi
app.kubernetes.io/component: web
data:
DISABLE_HTTPS: "1"
JICOFO_AUTH_USER: 'focus'
XMPP_BOSH_URL_BASE: 'http://jitsi-prosody.default.svc.cluster.local:5280'
NGINX_RESOLVER: '<kube-dns>' # TODO: Change this
---
apiVersion: v1
kind: ConfigMap
metadata:
name: jitsi-meet-config
labels:
app.kubernetes.io/name: jitsi-meet-config
app.kubernetes.io/instance: jitsi
app.kubernetes.io/component: web
data:
custom-config.js: |
config.useTurnUdp = true;
---
apiVersion: v1
kind: ConfigMap
metadata:
name: jitsi-jvb
labels:
app.kubernetes.io/name: jitsi-meet
app.kubernetes.io/instance: jitsi
app.kubernetes.io/component: jvb
data:
JVB_BREWERY_MUC: 'jvbbrewery'
JVB_PORT: '10000'
JVB_STUN_SERVERS: '<stunner-public-ip>:3478'
JVB_TCP_HARVESTER_DISABLED: '1'
XMPP_SERVER: 'jitsi-prosody.default.svc.cluster.local'
COLIBRI_REST_ENABLED: 'true'
ENABLE_COLIBRI_WEBSOCKET: 'false'
---
apiVersion: v1
kind: ConfigMap
metadata:
name: jitsi-jicofo
labels:
app.kubernetes.io/name: jitsi-meet
app.kubernetes.io/instance: jitsi
app.kubernetes.io/component: jicofo
data:
JVB_BREWERY_MUC: 'jvbbrewery'
XMPP_SERVER: 'jitsi-prosody.default.svc.cluster.local'
---
apiVersion: v1
kind: ConfigMap
metadata:
name: jitsi-prosody
labels:
app.kubernetes.io/name: prosody
app.kubernetes.io/instance: jitsi
data:
---
# Secrets
apiVersion: v1
kind: Secret
metadata:
name: prosody-jvb
labels:
app.kubernetes.io/name: jitsi-meet
app.kubernetes.io/instance: jitsi
app.kubernetes.io/component: jvb
type: Opaque
data:
JVB_AUTH_USER: 'anZi'
JVB_AUTH_PASSWORD: 'WEtyd0VxR1ZDeg=='
---
apiVersion: v1
kind: Secret
metadata:
name: prosody-jicofo
labels:
app.kubernetes.io/name: jitsi-meet
app.kubernetes.io/instance: jitsi
app.kubernetes.io/component: jicofo
type: Opaque
data:
JICOFO_AUTH_USER: 'Zm9jdXM='
JICOFO_AUTH_PASSWORD: 'aGFjbU1ZSUcyaA=='
JICOFO_COMPONENT_SECRET: 'VHZ1elB2SkNNeQ=='
---
apiVersion: v1
kind: Secret
metadata:
name: jitsi-prosody
labels:
app.kubernetes.io/name: prosody
app.kubernetes.io/instance: jitsi
type: Opaque
data:
---
# ClusterIssuer
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: [email protected]
privateKeySecretRef:
name: letsencrypt-prod
solvers:
- http01:
ingress:
name: jitsi-meet
---
# Ingress
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: jitsi-meet
labels:
app.kubernetes.io/name: jitsi-meet
app.kubernetes.io/instance: jitsi
app.kubernetes.io/component: web
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
tls:
- secretName: jitsi-secret
hosts:
- <public-ingress-ip>.nip.io # TODO: Change it
rules:
- host: <public-ingress-ip>.nip.io # TODO: Change it
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: jitsi-meet
port:
number: 80
---
# Jitsi web
apiVersion: apps/v1
kind: Deployment
metadata:
name: jitsi-web
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: jitsi-meet
app.kubernetes.io/instance: jitsi
app.kubernetes.io/component: web
template:
metadata:
labels:
app.kubernetes.io/name: jitsi-meet
app.kubernetes.io/instance: jitsi
app.kubernetes.io/component: web
spec:
containers:
- name: jitsi-meet
image: "jitsi/web:stable-7882"
imagePullPolicy: IfNotPresent
volumeMounts:
- name: config-volume
mountPath: /config/custom-config.js
subPath: custom-config.js
envFrom:
- configMapRef:
name: jitsi-meet
- configMapRef:
name: prosody-common
ports:
- name: http
containerPort: 80
protocol: TCP
- name: https
containerPort: 443
protocol: TCP
livenessProbe:
httpGet:
path: /
port: 80
readinessProbe:
httpGet:
path: /
port: 80
volumes:
- name: config-volume
configMap:
name: jitsi-meet-config
---
apiVersion: v1
kind: Service
metadata:
name: jitsi-meet
labels:
app.kubernetes.io/name: jitsi-meet
app.kubernetes.io/instance: jitsi
app.kubernetes.io/component: web
spec:
type: ClusterIP
ports:
- port: 80
protocol: TCP
name: http
selector:
app.kubernetes.io/name: jitsi-meet
app.kubernetes.io/instance: jitsi
app.kubernetes.io/component: web
---
# Prosody
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: jitsi-prosody
labels:
app.kubernetes.io/name: prosody
app.kubernetes.io/instance: jitsi
spec:
serviceName: "prosody"
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: prosody
app.kubernetes.io/instance: jitsi
template:
metadata:
labels:
app.kubernetes.io/name: prosody
app.kubernetes.io/instance: jitsi
spec:
containers:
- name: prosody
image: "l7mp/jitsi-prosody"
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
name: jitsi-prosody
- secretRef:
name: jitsi-prosody
- secretRef:
name: 'prosody-jicofo'
- secretRef:
name: 'prosody-jvb'
- configMapRef:
name: 'prosody-common'
ports:
- name: xmpp-c2s
containerPort: 5222
protocol: TCP
- name: xmpp-s2s
containerPort: 5269
protocol: TCP
- name: xmpp-component
containerPort: 5347
protocol: TCP
- name: bosh-insecure
containerPort: 5280
protocol: TCP
- name: bosh-secure
containerPort: 5281
protocol: TCP
livenessProbe:
httpGet:
path: /http-bind
port: bosh-insecure
readinessProbe:
httpGet:
path: /http-bind
port: bosh-insecure
volumeMounts:
- name: prosody-data
mountPath: /config/data
volumes:
- name: prosody-data
persistentVolumeClaim:
claimName: prosody-data
volumeClaimTemplates:
- metadata:
name: prosody-data
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 3G
---
apiVersion: v1
kind: Service
metadata:
name: jitsi-prosody
labels:
app.kubernetes.io/name: prosody
app.kubernetes.io/instance: jitsi
spec:
clusterIP: None
ports:
- port: 5280
protocol: TCP
name: tcp-bosh-insecure
- port: 5281
protocol: TCP
name: tcp-bosh-secure
- port: 5347
protocol: TCP
name: tcp-xmpp-component
- port: 5222
protocol: TCP
name: tcp-xmpp-c2
- port: 5269
protocol: TCP
name: tcp-xmpp-s2
selector:
app.kubernetes.io/name: prosody
app.kubernetes.io/instance: jitsi
---
# Jicofo
apiVersion: apps/v1
kind: Deployment
metadata:
name: jitsi-jicofo
labels:
app.kubernetes.io/name: jitsi-meet
app.kubernetes.io/instance: jitsi
app.kubernetes.io/component: jicofo
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: jitsi-meet
app.kubernetes.io/instance: jitsi
app.kubernetes.io/component: jicofo
template:
metadata:
labels:
app.kubernetes.io/name: jitsi-meet
app.kubernetes.io/instance: jitsi
app.kubernetes.io/component: jicofo
spec:
containers:
- name: jitsi-meet
image: "jitsi/jicofo:stable-7830"
imagePullPolicy: IfNotPresent
envFrom:
- secretRef:
name: prosody-jicofo
- configMapRef:
name: prosody-common
- configMapRef:
name: jitsi-jicofo
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
tcpSocket:
port: 8888
readinessProbe:
tcpSocket:
port: 8888
---
# JVB
apiVersion: apps/v1
kind: Deployment
metadata:
name: jitsi-jvb
labels:
app.kubernetes.io/name: jitsi-meet
app.kubernetes.io/instance: jitsi
app.kubernetes.io/component: jvb
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: jitsi-meet
app.kubernetes.io/instance: jitsi
app.kubernetes.io/component: jvb
template:
metadata:
labels:
app.kubernetes.io/name: jitsi-meet
app.kubernetes.io/instance: jitsi
app.kubernetes.io/component: jvb
spec:
containers:
- name: jitsi-meet
image: "jitsi/jvb:stable-7830"
imagePullPolicy: IfNotPresent
envFrom:
- secretRef:
name: prosody-jvb
- configMapRef:
name: prosody-common
- configMapRef:
name: jitsi-jvb
env:
ports:
- name: rtp-udp
containerPort: 10000
protocol: UDP
livenessProbe:
httpGet:
path: /about/health
port: 8080
readinessProbe:
httpGet:
path: /about/health
port: 8080
---
apiVersion: v1
kind: Service
metadata:
name: jitsi-jvb
labels:
app.kubernetes.io/name: jitsi-meet
app.kubernetes.io/instance: jitsi
app.kubernetes.io/component: jvb
spec:
type: ClusterIP
ports:
- port: 10000
protocol: UDP
name: rtp-udp
targetPort: 10000
selector:
app.kubernetes.io/name: jitsi-meet
app.kubernetes.io/instance: jitsi
app.kubernetes.io/component: jvb