apiVersion: apps/v1
kind: Deployment
metadata:
  name: stalwart
  labels:
    app.kubernetes.io/controller: main
    app.kubernetes.io/instance: stalwart
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: stalwart
    helm.sh/chart: stalwart-4.6.2
  namespace: stalwart
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/controller: main
      app.kubernetes.io/name: stalwart
      app.kubernetes.io/instance: stalwart
  template:
    metadata:
      labels:
        app.kubernetes.io/controller: main
        app.kubernetes.io/instance: stalwart
        app.kubernetes.io/name: stalwart
    spec:
      enableServiceLinks: false
      serviceAccountName: default
      automountServiceAccountToken: true
      hostIPC: false
      hostNetwork: false
      hostPID: false
      dnsPolicy: ClusterFirst
      containers:
        - image: stalwartlabs/stalwart:v0.15.3
          imagePullPolicy: IfNotPresent
          name: main
          resources:
            requests:
              cpu: 10m
              memory: 128Mi
          volumeMounts:
            - mountPath: /opt/stalwart
              name: config
      volumes:
        - name: config
          persistentVolumeClaim:
            claimName: stalwart-config
