apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: mautrix-whatsapp
  labels:
    app.kubernetes.io/controller: main
    app.kubernetes.io/instance: matrix-synapse
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: mautrix-whatsapp
    helm.sh/chart: mautrix-whatsapp-4.6.2
  namespace: matrix-synapse
spec:
  revisionHistoryLimit: 3
  replicas: 0
  podManagementPolicy: OrderedReady
  updateStrategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app.kubernetes.io/controller: main
      app.kubernetes.io/name: mautrix-whatsapp
      app.kubernetes.io/instance: matrix-synapse
  serviceName: mautrix-whatsapp
  template:
    metadata:
      labels:
        app.kubernetes.io/controller: main
        app.kubernetes.io/instance: matrix-synapse
        app.kubernetes.io/name: mautrix-whatsapp
    spec:
      enableServiceLinks: false
      serviceAccountName: default
      automountServiceAccountToken: true
      hostIPC: false
      hostNetwork: false
      hostPID: false
      dnsPolicy: ClusterFirst
      containers:
        - image: dock.mau.dev/mautrix/whatsapp:v0.2601.0
          imagePullPolicy: IfNotPresent
          name: main
          resources:
            requests:
              cpu: 10m
              memory: 64Mi
          volumeMounts:
            - mountPath: /data
              name: data
      volumes:
        - name: config
          secret:
            secretName: mautrix-whatsapp-config-secret
        - name: data
          persistentVolumeClaim:
            claimName: mautrix-whatsapp
        - name: registration
          secret:
            secretName: mautrix-whatsapp-config-secret
