apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: mailhog
  labels:
    app: mailhog
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mailhog
  template:
    metadata:
      labels:
        app: mailhog
    spec:
      volumes:
        - name: mailhog-maildir
          persistentVolumeClaim: { claimName: pvc-mailhog }
      containers:
        - image: mailhog/mailhog
          name: mailhog
          imagePullPolicy: IfNotPresent
          volumeMounts:
            - mountPath: /maildir
              name:      mailhog-maildir
          command:
            - "MailHog"
            - "-storage=maildir"
            - "-maildir-path=/maildir"
