| --- |
| apiVersion: networking.k8s.io/v1 |
| kind: Ingress |
| metadata: |
| name: zulip |
| namespace: mulk |
| labels: |
| name: zulip |
| k8s-app: zulip |
| annotations: |
| cert-manager.io/cluster-issuer: letsencrypt-prod |
| kubernetes.io/ingress.class: nginx |
| ingress.kubernetes.io/protocol: https |
| nginx.ingress.kubernetes.io/backend-protocol: https |
| spec: |
| rules: |
| - host: zulip.benkard.de |
| http: |
| paths: |
| - backend: |
| service: |
| name: zulip |
| port: |
| number: 443 |
| path: / |
| pathType: ImplementationSpecific |
| tls: |
| - hosts: |
| - zulip.benkard.de |
| secretName: zulip-tls |
| --- |
| apiVersion: v1 |
| kind: Service |
| metadata: |
| name: zulip |
| labels: |
| name: zulip |
| spec: |
| selector: |
| name: zulip |
| type: ClusterIP |
| clusterIP: None |
| ports: |
| - name: http |
| port: 80 |
| targetPort: 80 |
| protocol: TCP |
| - name: https |
| port: 443 |
| targetPort: 443 |
| protocol: TCP |
| --- |
| apiVersion: apps/v1 |
| kind: Deployment |
| metadata: |
| name: zulip |
| labels: |
| name: zulip |
| spec: |
| replicas: 1 |
| selector: |
| matchLabels: |
| name: zulip |
| template: |
| metadata: |
| labels: |
| name: zulip |
| spec: |
| containers: |
| - name: redis |
| image: docker.io/library/redis:alpine |
| command: |
| - 'sh' |
| - '-euc' |
| - | |
| echo "requirepass '$$REDIS_PASSWORD'" > /etc/redis.conf |
| exec redis-server /etc/redis.conf |
| resources: |
| requests: |
| cpu: 10m |
| limits: |
| cpu: 500m |
| env: |
| - name: REDIS_PASSWORD |
| valueFrom: |
| secretKeyRef: |
| name: zulip-secrets |
| key: redis-password |
| volumeMounts: |
| - name: redis-persistent-storage |
| mountPath: /var/lib/redis |
| - name: memcached |
| image: docker.io/library/memcached:alpine |
| resources: |
| requests: |
| cpu: 10m |
| limits: |
| cpu: 750m |
| memory: 768Mi |
| - name: rabbitmq |
| image: docker.io/library/rabbitmq:3.7.7 |
| resources: |
| requests: |
| cpu: 10m |
| limits: |
| cpu: 750m |
| memory: 768Mi |
| env: |
| - name: RABBITMQ_DEFAULT_USER |
| value: "zulip" |
| - name: RABBITMQ_DEFAULT_PASS |
| valueFrom: |
| secretKeyRef: |
| name: zulip-secrets |
| key: rabbitmq-password |
| volumeMounts: |
| - name: rabbitmq-persistent-storage |
| mountPath: /var/lib/rabbitmq |
| - name: zulip |
| image: docker.io/zulip/docker-zulip:11.6-0 |
| resources: |
| requests: |
| cpu: 10m |
| limits: |
| cpu: 1000m |
| memory: 4Gi |
| env: |
| - name: DB_HOST |
| value: 'postgresql.system' |
| - name: MEMCACHED_HOST |
| value: 'localhost' |
| - name: REDIS_HOST |
| value: 'localhost' |
| - name: RABBITMQ_HOST |
| value: 'localhost' |
| - name: SETTING_EXTERNAL_HOST |
| value: 'zulip.benkard.de' |
| - name: SETTING_ZULIP_ADMINISTRATOR |
| value: 'zulip@benkard.de' |
| - name: SETTING_EMAIL_HOST |
| value: 'mail.benkard.de' |
| - name: SETTING_EMAIL_HOST_USER |
| value: 'zulip@benkard.de' |
| - name: SETTING_NOREPLY_EMAIL_ADDRESS |
| value: 'zulip+noreply@benkard.de' |
| - name: SETTING_ADD_TOKENS_TO_NOREPLY_ADDRESS |
| value: 'True' |
| - name: SETTING_TOKENIZED_NOREPLY_EMAIL_ADDRESS |
| value: 'zulip+noreply-{token}@benkard.de' |
| - name: SETTING_EMAIL_PORT |
| value: '587' |
| - name: SETTING_EMAIL_USE_SSL |
| value: 'False' |
| - name: SETTING_EMAIL_USE_TLS |
| value: 'True' |
| - name: ZULIP_AUTH_BACKENDS |
| value: 'EmailAuthBackend' |
| #value: 'EmailAuthBackend,GitHubAuthBackend' |
| - name: SETTING_PUSH_NOTIFICATION_BOUNCER_URL |
| value: 'https://push.zulipchat.com' |
| - name: SECRETS_secret_key |
| valueFrom: |
| secretKeyRef: |
| name: zulip-secrets |
| key: secret-key |
| - name: SECRETS_postgres_password |
| valueFrom: |
| secretKeyRef: |
| name: zulip-secrets |
| key: database-password |
| - name: SECRETS_rabbitmq_password |
| valueFrom: |
| secretKeyRef: |
| name: zulip-secrets |
| key: rabbitmq-password |
| - name: SECRETS_email_password |
| valueFrom: |
| secretKeyRef: |
| name: zulip-secrets |
| key: email-password |
| - name: SECRETS_redis_password |
| valueFrom: |
| secretKeyRef: |
| name: zulip-secrets |
| key: redis-password |
| - name: SSL_CERTIFICATE_GENERATION |
| value: 'self-signed' |
| # Uncomment this when configuring the mobile push notifications service |
| # - name: PUSH_NOTIFICATION_BOUNCER_URL |
| # value: 'https://push.zulipchat.com' |
| ports: |
| - containerPort: 80 |
| name: http |
| protocol: TCP |
| - containerPort: 443 |
| name: https |
| protocol: TCP |
| volumeMounts: |
| - name: zulip-persistent-storage |
| mountPath: /data |
| # livenessProbe: |
| # httpGet: |
| # path: /login |
| # port: 80 |
| # scheme: HTTP |
| # initialDelaySeconds: 120 |
| # timeoutSeconds: 12 |
| volumes: |
| - name: zulip-persistent-storage |
| persistentVolumeClaim: |
| claimName: zulip-zulip-data |
| - name: redis-persistent-storage |
| persistentVolumeClaim: |
| claimName: zulip-redis-data |
| - name: rabbitmq-persistent-storage |
| persistentVolumeClaim: |
| claimName: zulip-rabbitmq-data |
| --- |
| apiVersion: v1 |
| kind: PersistentVolumeClaim |
| metadata: |
| name: zulip-redis-data |
| namespace: mulk |
| labels: |
| name: zulip-redis-data |
| k8s-app: zulip |
| annotations: |
| volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path |
| volume.kubernetes.io/selected-node: ifirn |
| spec: |
| accessModes: |
| - ReadWriteOnce |
| resources: |
| requests: |
| storage: 500Mi |
| storageClassName: local-path |
| --- |
| apiVersion: v1 |
| kind: PersistentVolumeClaim |
| metadata: |
| name: zulip-rabbitmq-data |
| namespace: mulk |
| labels: |
| name: zulip-rabbitmq-data |
| k8s-app: zulip |
| annotations: |
| volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path |
| volume.kubernetes.io/selected-node: ifirn |
| spec: |
| accessModes: |
| - ReadWriteOnce |
| resources: |
| requests: |
| storage: 500Mi |
| storageClassName: local-path |
| --- |
| apiVersion: v1 |
| kind: PersistentVolumeClaim |
| metadata: |
| name: zulip-zulip-data |
| namespace: mulk |
| labels: |
| name: zulip-zulip-data |
| k8s-app: zulip |
| annotations: |
| volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path |
| volume.kubernetes.io/selected-node: ifirn |
| spec: |
| accessModes: |
| - ReadWriteOnce |
| resources: |
| requests: |
| storage: 500Mi |
| storageClassName: local-path |
| --- |