apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: jitsi
  labels:
    k8s-app: web
  name: web
spec:
  replicas: 1 # one web instance per shard
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  selector:
    matchLabels:
      k8s-app: web
  template:
    metadata:
      labels:
        k8s-app: web
    spec:
      volumes:
        - name: web
          configMap:
            name: web
            items:
              - key: welcomePageAdditionalContent.html
                path: welcomePageAdditionalContent.html
              - key: plugin.head.html
                path: plugin.head.html
              - key: config.js
                path: config.js
              - key: interface_config.js
                path: interface_config.js
      containers:
        - name: web
          resources:
            limits:
              memory: 300Mi
              cpu: 400m
            requests:
              memory: 300Mi
              cpu: 400m
          image: jitsi/web:stable-4548-1
          imagePullPolicy: Always
          readinessProbe:
            httpGet:
              port: 80
          volumeMounts:
          - name: web
            mountPath: /usr/share/jitsi-meet/static/welcomePageAdditionalContent.html
            subPath: welcomePageAdditionalContent.html
          - name: web
            mountPath: /usr/share/jitsi-meet/plugin.head.html
            subPath: plugin.head.html
          - name: web
            mountPath: /defaults/config.js
            subPath: config.js
          - name: web
            mountPath: /defaults/interface_config.js
            subPath: interface_config.js
          env:
            - name: DISABLE_HTTPS
              value: "1"
            - name: HTTP_PORT
              value: "80"
            - name: XMPP_SERVER
              value: prosody
            - name: JICOFO_AUTH_USER
              value: focus
            - name: XMPP_DOMAIN
              value: meet.jitsi
            - name: XMPP_AUTH_DOMAIN
              value: auth.meet.jitsi
            - name: XMPP_INTERNAL_MUC_DOMAIN
              value: internal-muc.meet.jitsi
            - name: XMPP_BOSH_URL_BASE
              value: http://prosody:5280
            - name: XMPP_MUC_DOMAIN
              value: muc.meet.jitsi
            - name: TZ
              value: Europe/Berlin
            - name: JVB_TCP_HARVESTER_DISABLED
              value: "true"
