blob: 4df73249df5de8727f006d8344f63b0ad3c43a60 [file] [log] [blame]
Matthias Andreas Benkardd348fe12026-10-23 07:15:47 +02001---
2apiVersion: networking.k8s.io/v1
3kind: Ingress
4metadata:
5 name: zulip
6 namespace: mulk
7 labels:
8 name: zulip
9 k8s-app: zulip
10 annotations:
11 cert-manager.io/cluster-issuer: letsencrypt-prod
12 kubernetes.io/ingress.class: nginx
13 ingress.kubernetes.io/protocol: https
14 nginx.ingress.kubernetes.io/backend-protocol: https
15spec:
16 rules:
17 - host: zulip.benkard.de
18 http:
19 paths:
20 - backend:
21 service:
22 name: zulip
23 port:
24 number: 443
25 path: /
26 pathType: ImplementationSpecific
27 tls:
28 - hosts:
29 - zulip.benkard.de
30 secretName: zulip-tls
31---
32apiVersion: v1
33kind: Service
34metadata:
35 name: zulip
36 labels:
37 name: zulip
38spec:
39 selector:
40 name: zulip
41 type: ClusterIP
42 clusterIP: None
43 ports:
44 - name: http
45 port: 80
46 targetPort: 80
47 protocol: TCP
48 - name: https
49 port: 443
50 targetPort: 443
51 protocol: TCP
52---
53apiVersion: apps/v1
54kind: Deployment
55metadata:
56 name: zulip
57 labels:
58 name: zulip
59spec:
60 replicas: 1
Matthias Andreas Benkard5ca68d52026-11-05 17:20:40 +010061 # Single replica on RWO volumes: never run two Zulips at once.
62 strategy:
63 type: Recreate
Matthias Andreas Benkardd348fe12026-10-23 07:15:47 +020064 selector:
65 matchLabels:
66 name: zulip
67 template:
68 metadata:
69 labels:
70 name: zulip
71 spec:
72 containers:
73 - name: redis
Matthias Andreas Benkard5ca68d52026-11-05 17:20:40 +010074 image: docker.io/library/redis:8.2.1-alpine
Matthias Andreas Benkardd348fe12026-10-23 07:15:47 +020075 command:
76 - 'sh'
77 - '-euc'
78 - |
79 echo "requirepass '$$REDIS_PASSWORD'" > /etc/redis.conf
80 exec redis-server /etc/redis.conf
81 resources:
82 requests:
83 cpu: 10m
84 limits:
85 cpu: 500m
86 env:
87 - name: REDIS_PASSWORD
88 valueFrom:
89 secretKeyRef:
90 name: zulip-secrets
91 key: redis-password
92 volumeMounts:
93 - name: redis-persistent-storage
94 mountPath: /var/lib/redis
95 - name: memcached
Matthias Andreas Benkard5ca68d52026-11-05 17:20:40 +010096 image: docker.io/library/memcached:1.6.39-alpine
Matthias Andreas Benkardd348fe12026-10-23 07:15:47 +020097 resources:
98 requests:
99 cpu: 10m
100 limits:
101 cpu: 750m
102 memory: 768Mi
103 - name: rabbitmq
Matthias Andreas Benkard5ca68d52026-11-05 17:20:40 +0100104 # 3.7.7 → 4.2 cannot be upgraded in place; started on a fresh data
105 # directory on 2026-11-05 (all queues were empty).
106 image: docker.io/library/rabbitmq:4.2.9
107 # As in upstream docker-zulip: the default user goes into the config
108 # file rather than relying on the deprecated RABBITMQ_DEFAULT_* env.
109 command:
110 - 'sh'
111 - '-euc'
112 - |
113 printf 'default_user = %s\ndefault_pass = %s\n' "$RABBITMQ_DEFAULT_USER" "$RABBITMQ_DEFAULT_PASS" > /etc/rabbitmq/conf.d/90-zulip.conf
114 exec docker-entrypoint.sh rabbitmq-server
Matthias Andreas Benkardd348fe12026-10-23 07:15:47 +0200115 resources:
116 requests:
117 cpu: 10m
118 limits:
119 cpu: 750m
120 memory: 768Mi
121 env:
122 - name: RABBITMQ_DEFAULT_USER
123 value: "zulip"
124 - name: RABBITMQ_DEFAULT_PASS
125 valueFrom:
126 secretKeyRef:
127 name: zulip-secrets
128 key: rabbitmq-password
129 volumeMounts:
130 - name: rabbitmq-persistent-storage
131 mountPath: /var/lib/rabbitmq
132 - name: zulip
Matthias Andreas Benkard5ca68d52026-11-05 17:20:40 +0100133 # 12.x moved from zulip/docker-zulip to this image and renamed the
134 # service settings; the entrypoint refuses DB_HOST and
135 # SSL_CERTIFICATE_GENERATION.
136 image: ghcr.io/zulip/zulip-server:12.3-0
Matthias Andreas Benkardd348fe12026-10-23 07:15:47 +0200137 resources:
138 requests:
139 cpu: 10m
140 limits:
141 cpu: 1000m
142 memory: 4Gi
143 env:
Matthias Andreas Benkard5ca68d52026-11-05 17:20:40 +0100144 - name: SETTING_REMOTE_POSTGRES_HOST
Matthias Andreas Benkardd348fe12026-10-23 07:15:47 +0200145 value: 'postgresql.system'
Matthias Andreas Benkard5ca68d52026-11-05 17:20:40 +0100146 - name: CONFIG_postgresql__database_user
147 value: 'zulip'
148 - name: CONFIG_postgresql__database_name
149 value: 'zulip'
150 - name: SETTING_MEMCACHED_LOCATION
151 value: '127.0.0.1:11211'
152 - name: SETTING_REDIS_HOST
153 value: '127.0.0.1'
154 - name: SETTING_RABBITMQ_HOST
155 value: '127.0.0.1'
Matthias Andreas Benkardd348fe12026-10-23 07:15:47 +0200156 - name: SETTING_EXTERNAL_HOST
157 value: 'zulip.benkard.de'
158 - name: SETTING_ZULIP_ADMINISTRATOR
159 value: 'zulip@benkard.de'
160 - name: SETTING_EMAIL_HOST
161 value: 'mail.benkard.de'
162 - name: SETTING_EMAIL_HOST_USER
163 value: 'zulip@benkard.de'
164 - name: SETTING_NOREPLY_EMAIL_ADDRESS
165 value: 'zulip+noreply@benkard.de'
166 - name: SETTING_ADD_TOKENS_TO_NOREPLY_ADDRESS
167 value: 'True'
168 - name: SETTING_TOKENIZED_NOREPLY_EMAIL_ADDRESS
169 value: 'zulip+noreply-{token}@benkard.de'
170 - name: SETTING_EMAIL_PORT
171 value: '587'
172 - name: SETTING_EMAIL_USE_SSL
173 value: 'False'
174 - name: SETTING_EMAIL_USE_TLS
175 value: 'True'
176 - name: ZULIP_AUTH_BACKENDS
177 value: 'EmailAuthBackend'
178 #value: 'EmailAuthBackend,GitHubAuthBackend'
179 - name: SETTING_PUSH_NOTIFICATION_BOUNCER_URL
180 value: 'https://push.zulipchat.com'
181 - name: SECRETS_secret_key
182 valueFrom:
183 secretKeyRef:
184 name: zulip-secrets
185 key: secret-key
186 - name: SECRETS_postgres_password
187 valueFrom:
188 secretKeyRef:
189 name: zulip-secrets
190 key: database-password
191 - name: SECRETS_rabbitmq_password
192 valueFrom:
193 secretKeyRef:
194 name: zulip-secrets
195 key: rabbitmq-password
196 - name: SECRETS_email_password
197 valueFrom:
198 secretKeyRef:
199 name: zulip-secrets
200 key: email-password
201 - name: SECRETS_redis_password
202 valueFrom:
203 secretKeyRef:
204 name: zulip-secrets
205 key: redis-password
Matthias Andreas Benkard5ca68d52026-11-05 17:20:40 +0100206 # The Ingress talks HTTPS to the backend.
207 - name: CERTIFICATES
Matthias Andreas Benkardd348fe12026-10-23 07:15:47 +0200208 value: 'self-signed'
209 # Uncomment this when configuring the mobile push notifications service
210 # - name: PUSH_NOTIFICATION_BOUNCER_URL
211 # value: 'https://push.zulipchat.com'
212 ports:
213 - containerPort: 80
214 name: http
215 protocol: TCP
216 - containerPort: 443
217 name: https
218 protocol: TCP
219 volumeMounts:
220 - name: zulip-persistent-storage
221 mountPath: /data
222 # livenessProbe:
223 # httpGet:
224 # path: /login
225 # port: 80
226 # scheme: HTTP
227 # initialDelaySeconds: 120
228 # timeoutSeconds: 12
229 volumes:
230 - name: zulip-persistent-storage
231 persistentVolumeClaim:
232 claimName: zulip-zulip-data
233 - name: redis-persistent-storage
234 persistentVolumeClaim:
235 claimName: zulip-redis-data
236 - name: rabbitmq-persistent-storage
237 persistentVolumeClaim:
238 claimName: zulip-rabbitmq-data
239---
240apiVersion: v1
241kind: PersistentVolumeClaim
242metadata:
243 name: zulip-redis-data
244 namespace: mulk
245 labels:
246 name: zulip-redis-data
247 k8s-app: zulip
248 annotations:
249 volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path
250 volume.kubernetes.io/selected-node: ifirn
251spec:
252 accessModes:
253 - ReadWriteOnce
254 resources:
255 requests:
256 storage: 500Mi
257 storageClassName: local-path
258---
259apiVersion: v1
260kind: PersistentVolumeClaim
261metadata:
262 name: zulip-rabbitmq-data
263 namespace: mulk
264 labels:
265 name: zulip-rabbitmq-data
266 k8s-app: zulip
267 annotations:
268 volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path
269 volume.kubernetes.io/selected-node: ifirn
270spec:
271 accessModes:
272 - ReadWriteOnce
273 resources:
274 requests:
275 storage: 500Mi
276 storageClassName: local-path
277---
278apiVersion: v1
279kind: PersistentVolumeClaim
280metadata:
281 name: zulip-zulip-data
282 namespace: mulk
283 labels:
284 name: zulip-zulip-data
285 k8s-app: zulip
286 annotations:
287 volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path
288 volume.kubernetes.io/selected-node: ifirn
289spec:
290 accessModes:
291 - ReadWriteOnce
292 resources:
293 requests:
294 storage: 500Mi
295 storageClassName: local-path
296---