-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprosody-deployment.yaml
147 lines (146 loc) · 4.83 KB
/
prosody-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
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
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: jitsi
labels:
k8s-app: prosody
name: prosody
spec:
replicas: 1 # one prosody instance per shard
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
selector:
matchLabels:
k8s-app: prosody
shard: "0"
template:
metadata:
labels:
k8s-app: prosody
shard: "0"
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '5280'
spec:
volumes:
- name: prosody
configMap:
name: prosody
items:
- key: mod_prometheus.lua
path: mod_prometheus.lua
- key: mod_measure_stanza_counts.lua
path: mod_measure_stanza_counts.lua
- key: mod_measure_client_presence.lua
path: mod_measure_client_presence.lua
- key: jitsi-meet.cfg.lua
path: jitsi-meet.cfg.lua
containers:
- name: prosody
resources:
limits:
memory: 300Mi
cpu: 300m
requests:
memory: 300Mi
cpu: 300m
image: jitsi/prosody:stable-5142-4
imagePullPolicy: Always
ports:
- name: metrics
containerPort: 5280
readinessProbe:
## the command that is called obeys standard exit codes
exec:
command:
- prosodyctl
- --config
- /config/prosody.cfg.lua
- status
volumeMounts:
# add-ons that allow exporting of metrics to prometheus (mod_prometheus.lua)
# or enrich the available stats (mod_measure_stanza_counts.lua,
# mod_measure_client_presence.lua)
- name: prosody
mountPath: /prosody-plugins-custom/mod_prometheus.lua
subPath: mod_prometheus.lua
- name: prosody
mountPath: /usr/lib/prosody/modules/mod_measure_stanza_counts.lua
subPath: mod_measure_stanza_counts.lua
- name: prosody
mountPath: /usr/lib/prosody/modules/mod_measure_client_presence.lua
subPath: mod_measure_client_presence.lua
- name: prosody
mountPath: /defaults/conf.d/jitsi-meet.cfg.lua
subPath: jitsi-meet.cfg.lua
env:
- name: XMPP_DOMAIN
valueFrom:
configMapKeyRef:
key: XMPP_DOMAIN
name: common
- name: XMPP_AUTH_DOMAIN
valueFrom:
configMapKeyRef:
key: XMPP_AUTH_DOMAIN
name: common
- name: XMPP_MUC_DOMAIN
valueFrom:
configMapKeyRef:
key: XMPP_MUC_DOMAIN
name: common
- name: XMPP_INTERNAL_MUC_DOMAIN
valueFrom:
configMapKeyRef:
key: XMPP_INTERNAL_MUC_DOMAIN
name: common
- name: XMPP_MUC_MODULES
value: muc_meeting_id,muc_domain_mapper
- name: JICOFO_COMPONENT_SECRET
valueFrom:
secretKeyRef:
name: jitsi-config
key: JICOFO_COMPONENT_SECRET
- name: JVB_AUTH_USER
valueFrom:
configMapKeyRef:
key: JVB_AUTH_USER
name: common
- name: JVB_AUTH_PASSWORD
valueFrom:
secretKeyRef:
name: jitsi-config
key: JVB_AUTH_PASSWORD
- name: JICOFO_AUTH_USER
valueFrom:
configMapKeyRef:
key: JICOFO_AUTH_USER
name: common
- name: JICOFO_AUTH_PASSWORD
valueFrom:
secretKeyRef:
name: jitsi-config
key: JICOFO_AUTH_PASSWORD
- name: TZ
valueFrom:
configMapKeyRef:
key: TIMEZONE
name: common
- name: JVB_TCP_HARVESTER_DISABLED
value: "true"
# activate add-ons that enrich the available stats of prosody
- name: GLOBAL_MODULES
value: prometheus,measure_stanza_counts,measure_client_presence,carbons,blocklist,vcard4,vcard_legacy
# config to allow exporting metrics in prometheus format by prometheus add-on
- name: GLOBAL_CONFIG
value: statistics = "internal";\nstatistics_interval = 15;
- name: ENABLE_LOBBY
value: "true"
- name: ENABLE_XMPP_WEBSOCKET
valueFrom:
configMapKeyRef:
key: ENABLE_XMPP_WEBSOCKET
name: common