| 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 |
| 61 | selector: |
| 62 | matchLabels: |
| 63 | name: zulip |
| 64 | template: |
| 65 | metadata: |
| 66 | labels: |
| 67 | name: zulip |
| 68 | spec: |
| 69 | containers: |
| 70 | - name: redis |
| 71 | image: docker.io/library/redis:alpine |
| 72 | command: |
| 73 | - 'sh' |
| 74 | - '-euc' |
| 75 | - | |
| 76 | echo "requirepass '$$REDIS_PASSWORD'" > /etc/redis.conf |
| 77 | exec redis-server /etc/redis.conf |
| 78 | resources: |
| 79 | requests: |
| 80 | cpu: 10m |
| 81 | limits: |
| 82 | cpu: 500m |
| 83 | env: |
| 84 | - name: REDIS_PASSWORD |
| 85 | valueFrom: |
| 86 | secretKeyRef: |
| 87 | name: zulip-secrets |
| 88 | key: redis-password |
| 89 | volumeMounts: |
| 90 | - name: redis-persistent-storage |
| 91 | mountPath: /var/lib/redis |
| 92 | - name: memcached |
| 93 | image: docker.io/library/memcached:alpine |
| 94 | resources: |
| 95 | requests: |
| 96 | cpu: 10m |
| 97 | limits: |
| 98 | cpu: 750m |
| 99 | memory: 768Mi |
| 100 | - name: rabbitmq |
| 101 | image: docker.io/library/rabbitmq:3.7.7 |
| 102 | resources: |
| 103 | requests: |
| 104 | cpu: 10m |
| 105 | limits: |
| 106 | cpu: 750m |
| 107 | memory: 768Mi |
| 108 | env: |
| 109 | - name: RABBITMQ_DEFAULT_USER |
| 110 | value: "zulip" |
| 111 | - name: RABBITMQ_DEFAULT_PASS |
| 112 | valueFrom: |
| 113 | secretKeyRef: |
| 114 | name: zulip-secrets |
| 115 | key: rabbitmq-password |
| 116 | volumeMounts: |
| 117 | - name: rabbitmq-persistent-storage |
| 118 | mountPath: /var/lib/rabbitmq |
| 119 | - name: zulip |
| 120 | image: docker.io/zulip/docker-zulip:11.6-0 |
| 121 | resources: |
| 122 | requests: |
| 123 | cpu: 10m |
| 124 | limits: |
| 125 | cpu: 1000m |
| 126 | memory: 4Gi |
| 127 | env: |
| 128 | - name: DB_HOST |
| 129 | value: 'postgresql.system' |
| 130 | - name: MEMCACHED_HOST |
| 131 | value: 'localhost' |
| 132 | - name: REDIS_HOST |
| 133 | value: 'localhost' |
| 134 | - name: RABBITMQ_HOST |
| 135 | value: 'localhost' |
| 136 | - name: SETTING_EXTERNAL_HOST |
| 137 | value: 'zulip.benkard.de' |
| 138 | - name: SETTING_ZULIP_ADMINISTRATOR |
| 139 | value: 'zulip@benkard.de' |
| 140 | - name: SETTING_EMAIL_HOST |
| 141 | value: 'mail.benkard.de' |
| 142 | - name: SETTING_EMAIL_HOST_USER |
| 143 | value: 'zulip@benkard.de' |
| 144 | - name: SETTING_NOREPLY_EMAIL_ADDRESS |
| 145 | value: 'zulip+noreply@benkard.de' |
| 146 | - name: SETTING_ADD_TOKENS_TO_NOREPLY_ADDRESS |
| 147 | value: 'True' |
| 148 | - name: SETTING_TOKENIZED_NOREPLY_EMAIL_ADDRESS |
| 149 | value: 'zulip+noreply-{token}@benkard.de' |
| 150 | - name: SETTING_EMAIL_PORT |
| 151 | value: '587' |
| 152 | - name: SETTING_EMAIL_USE_SSL |
| 153 | value: 'False' |
| 154 | - name: SETTING_EMAIL_USE_TLS |
| 155 | value: 'True' |
| 156 | - name: ZULIP_AUTH_BACKENDS |
| 157 | value: 'EmailAuthBackend' |
| 158 | #value: 'EmailAuthBackend,GitHubAuthBackend' |
| 159 | - name: SETTING_PUSH_NOTIFICATION_BOUNCER_URL |
| 160 | value: 'https://push.zulipchat.com' |
| 161 | - name: SECRETS_secret_key |
| 162 | valueFrom: |
| 163 | secretKeyRef: |
| 164 | name: zulip-secrets |
| 165 | key: secret-key |
| 166 | - name: SECRETS_postgres_password |
| 167 | valueFrom: |
| 168 | secretKeyRef: |
| 169 | name: zulip-secrets |
| 170 | key: database-password |
| 171 | - name: SECRETS_rabbitmq_password |
| 172 | valueFrom: |
| 173 | secretKeyRef: |
| 174 | name: zulip-secrets |
| 175 | key: rabbitmq-password |
| 176 | - name: SECRETS_email_password |
| 177 | valueFrom: |
| 178 | secretKeyRef: |
| 179 | name: zulip-secrets |
| 180 | key: email-password |
| 181 | - name: SECRETS_redis_password |
| 182 | valueFrom: |
| 183 | secretKeyRef: |
| 184 | name: zulip-secrets |
| 185 | key: redis-password |
| 186 | - name: SSL_CERTIFICATE_GENERATION |
| 187 | value: 'self-signed' |
| 188 | # Uncomment this when configuring the mobile push notifications service |
| 189 | # - name: PUSH_NOTIFICATION_BOUNCER_URL |
| 190 | # value: 'https://push.zulipchat.com' |
| 191 | ports: |
| 192 | - containerPort: 80 |
| 193 | name: http |
| 194 | protocol: TCP |
| 195 | - containerPort: 443 |
| 196 | name: https |
| 197 | protocol: TCP |
| 198 | volumeMounts: |
| 199 | - name: zulip-persistent-storage |
| 200 | mountPath: /data |
| 201 | # livenessProbe: |
| 202 | # httpGet: |
| 203 | # path: /login |
| 204 | # port: 80 |
| 205 | # scheme: HTTP |
| 206 | # initialDelaySeconds: 120 |
| 207 | # timeoutSeconds: 12 |
| 208 | volumes: |
| 209 | - name: zulip-persistent-storage |
| 210 | persistentVolumeClaim: |
| 211 | claimName: zulip-zulip-data |
| 212 | - name: redis-persistent-storage |
| 213 | persistentVolumeClaim: |
| 214 | claimName: zulip-redis-data |
| 215 | - name: rabbitmq-persistent-storage |
| 216 | persistentVolumeClaim: |
| 217 | claimName: zulip-rabbitmq-data |
| 218 | --- |
| 219 | apiVersion: v1 |
| 220 | kind: PersistentVolumeClaim |
| 221 | metadata: |
| 222 | name: zulip-redis-data |
| 223 | namespace: mulk |
| 224 | labels: |
| 225 | name: zulip-redis-data |
| 226 | k8s-app: zulip |
| 227 | annotations: |
| 228 | volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path |
| 229 | volume.kubernetes.io/selected-node: ifirn |
| 230 | spec: |
| 231 | accessModes: |
| 232 | - ReadWriteOnce |
| 233 | resources: |
| 234 | requests: |
| 235 | storage: 500Mi |
| 236 | storageClassName: local-path |
| 237 | --- |
| 238 | apiVersion: v1 |
| 239 | kind: PersistentVolumeClaim |
| 240 | metadata: |
| 241 | name: zulip-rabbitmq-data |
| 242 | namespace: mulk |
| 243 | labels: |
| 244 | name: zulip-rabbitmq-data |
| 245 | k8s-app: zulip |
| 246 | annotations: |
| 247 | volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path |
| 248 | volume.kubernetes.io/selected-node: ifirn |
| 249 | spec: |
| 250 | accessModes: |
| 251 | - ReadWriteOnce |
| 252 | resources: |
| 253 | requests: |
| 254 | storage: 500Mi |
| 255 | storageClassName: local-path |
| 256 | --- |
| 257 | apiVersion: v1 |
| 258 | kind: PersistentVolumeClaim |
| 259 | metadata: |
| 260 | name: zulip-zulip-data |
| 261 | namespace: mulk |
| 262 | labels: |
| 263 | name: zulip-zulip-data |
| 264 | k8s-app: zulip |
| 265 | annotations: |
| 266 | volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path |
| 267 | volume.kubernetes.io/selected-node: ifirn |
| 268 | spec: |
| 269 | accessModes: |
| 270 | - ReadWriteOnce |
| 271 | resources: |
| 272 | requests: |
| 273 | storage: 500Mi |
| 274 | storageClassName: local-path |
| 275 | --- |