| Matthias Andreas Benkard | d348fe1 | 2026-10-23 07:15:47 +0200 | [diff] [blame] | 1 | --- |
| 2 | apiVersion: networking.k8s.io/v1 |
| 3 | kind: Ingress |
| 4 | metadata: |
| 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 |
| 15 | spec: |
| 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 | --- |
| 32 | apiVersion: v1 |
| 33 | kind: Service |
| 34 | metadata: |
| 35 | name: zulip |
| 36 | labels: |
| 37 | name: zulip |
| 38 | spec: |
| 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 | --- |
| 53 | apiVersion: apps/v1 |
| 54 | kind: Deployment |
| 55 | metadata: |
| 56 | name: zulip |
| 57 | labels: |
| 58 | name: zulip |
| 59 | spec: |
| 60 | replicas: 1 |
| Matthias Andreas Benkard | 5ca68d5 | 2026-11-05 17:20:40 +0100 | [diff] [blame] | 61 | # Single replica on RWO volumes: never run two Zulips at once. |
| 62 | strategy: |
| 63 | type: Recreate |
| Matthias Andreas Benkard | d348fe1 | 2026-10-23 07:15:47 +0200 | [diff] [blame] | 64 | selector: |
| 65 | matchLabels: |
| 66 | name: zulip |
| 67 | template: |
| 68 | metadata: |
| 69 | labels: |
| 70 | name: zulip |
| 71 | spec: |
| 72 | containers: |
| 73 | - name: redis |
| Matthias Andreas Benkard | 5ca68d5 | 2026-11-05 17:20:40 +0100 | [diff] [blame] | 74 | image: docker.io/library/redis:8.2.1-alpine |
| Matthias Andreas Benkard | d348fe1 | 2026-10-23 07:15:47 +0200 | [diff] [blame] | 75 | 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 Benkard | 5ca68d5 | 2026-11-05 17:20:40 +0100 | [diff] [blame] | 96 | image: docker.io/library/memcached:1.6.39-alpine |
| Matthias Andreas Benkard | d348fe1 | 2026-10-23 07:15:47 +0200 | [diff] [blame] | 97 | resources: |
| 98 | requests: |
| 99 | cpu: 10m |
| 100 | limits: |
| 101 | cpu: 750m |
| 102 | memory: 768Mi |
| 103 | - name: rabbitmq |
| Matthias Andreas Benkard | 5ca68d5 | 2026-11-05 17:20:40 +0100 | [diff] [blame] | 104 | # 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 Benkard | d348fe1 | 2026-10-23 07:15:47 +0200 | [diff] [blame] | 115 | 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 Benkard | 5ca68d5 | 2026-11-05 17:20:40 +0100 | [diff] [blame] | 133 | # 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 Benkard | d348fe1 | 2026-10-23 07:15:47 +0200 | [diff] [blame] | 137 | resources: |
| 138 | requests: |
| 139 | cpu: 10m |
| 140 | limits: |
| 141 | cpu: 1000m |
| 142 | memory: 4Gi |
| 143 | env: |
| Matthias Andreas Benkard | 5ca68d5 | 2026-11-05 17:20:40 +0100 | [diff] [blame] | 144 | - name: SETTING_REMOTE_POSTGRES_HOST |
| Matthias Andreas Benkard | d348fe1 | 2026-10-23 07:15:47 +0200 | [diff] [blame] | 145 | value: 'postgresql.system' |
| Matthias Andreas Benkard | 5ca68d5 | 2026-11-05 17:20:40 +0100 | [diff] [blame] | 146 | - 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 Benkard | d348fe1 | 2026-10-23 07:15:47 +0200 | [diff] [blame] | 156 | - 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 Benkard | 5ca68d5 | 2026-11-05 17:20:40 +0100 | [diff] [blame] | 206 | # The Ingress talks HTTPS to the backend. |
| 207 | - name: CERTIFICATES |
| Matthias Andreas Benkard | d348fe1 | 2026-10-23 07:15:47 +0200 | [diff] [blame] | 208 | 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 | --- |
| 240 | apiVersion: v1 |
| 241 | kind: PersistentVolumeClaim |
| 242 | metadata: |
| 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 |
| 251 | spec: |
| 252 | accessModes: |
| 253 | - ReadWriteOnce |
| 254 | resources: |
| 255 | requests: |
| 256 | storage: 500Mi |
| 257 | storageClassName: local-path |
| 258 | --- |
| 259 | apiVersion: v1 |
| 260 | kind: PersistentVolumeClaim |
| 261 | metadata: |
| 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 |
| 270 | spec: |
| 271 | accessModes: |
| 272 | - ReadWriteOnce |
| 273 | resources: |
| 274 | requests: |
| 275 | storage: 500Mi |
| 276 | storageClassName: local-path |
| 277 | --- |
| 278 | apiVersion: v1 |
| 279 | kind: PersistentVolumeClaim |
| 280 | metadata: |
| 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 |
| 289 | spec: |
| 290 | accessModes: |
| 291 | - ReadWriteOnce |
| 292 | resources: |
| 293 | requests: |
| 294 | storage: 500Mi |
| 295 | storageClassName: local-path |
| 296 | --- |