---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: matrix-element
spec:
  replicas: 3
  selector:
    matchLabels:
      app.kubernetes.io/name: element
      app.kubernetes.io/instance: matrix
  template:
    metadata:
      labels:
        app.kubernetes.io/name: element
        app.kubernetes.io/instance: matrix
    spec:
      containers:
        - name: element
          image: "vectorim/element-web:v1.7.33"
          imagePullPolicy: IfNotPresent
          ports:
            - name: http
              containerPort: 80
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /
              port: http
          readinessProbe:
            httpGet:
              path: /
              port: http
          volumeMounts:
            - name: config-volume
              mountPath: /app/config.json
              subPath: config.json
      volumes:
        - name: config-volume
          configMap:
            name: element
