apiVersion: apps/v1
kind: Deployment
metadata:
  name: kuttlingresstest
  labels:
    app: mailhog-kuttl
    app.kubernetes.io/created-by: mailhog.operators.patrick.mx
    app.kubernetes.io/instance: kuttlingresstest
    app.kubernetes.io/managed-by: mailhog.operators.patrick.mx
    app.openshift.io/runtime: golang
    mailhoginstance_cr: kuttlingresstest
    mailhogtype: mailhoginstance
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/created-by: mailhog.operators.patrick.mx
      app.kubernetes.io/instance: kuttlingresstest
      app.kubernetes.io/managed-by: mailhog.operators.patrick.mx
      app.openshift.io/runtime: golang
      mailhoginstance_cr: kuttlingresstest
      mailhogtype: mailhoginstance
  template:
    metadata:
      labels:
        app.kubernetes.io/created-by: mailhog.operators.patrick.mx
        app.kubernetes.io/instance: kuttlingresstest
        app.kubernetes.io/managed-by: mailhog.operators.patrick.mx
        app.openshift.io/runtime: golang
        mailhoginstance_cr: kuttlingresstest
        mailhogtype: mailhoginstance
    spec:
      volumes:
        - name: settings-files
          configMap:
            name: kuttlingresstest
            defaultMode: 420
      containers:
        - name: mailhog
          env:
            - name: MH_SMTP_BIND_ADDR
              value: '0.0.0.0:1025'
            - name: MH_API_BIND_ADDR
              value: '0.0.0.0:8025'
            - name: MH_UI_BIND_ADDR
              value: '0.0.0.0:8025'
            - name: MH_STORAGE
              value: memory
            - name: MH_OUTGOING_SMTP
              value: /mailhog/settings/files/upstream.servers.json
            - name: MH_AUTH_FILE
              value: /mailhog/settings/files/users.list.bcrypt
          readinessProbe:
            tcpSocket:
              port: 8025
            initialDelaySeconds: 10
            timeoutSeconds: 2
            periodSeconds: 5
            successThreshold: 1
            failureThreshold: 3
          livenessProbe:
            tcpSocket:
              port: 8025
            initialDelaySeconds: 10
            timeoutSeconds: 2
            periodSeconds: 5
            successThreshold: 1
            failureThreshold: 3
          startupProbe:
            tcpSocket:
              port: 8025
            initialDelaySeconds: 10
            timeoutSeconds: 2
            periodSeconds: 5
            successThreshold: 1
            failureThreshold: 3
          ports:
            - name: http
              containerPort: 8025
              protocol: TCP
            - name: smtp
              containerPort: 1025
              protocol: TCP
          volumeMounts:
            - name: settings-files
              mountPath: /mailhog/settings/files
          image: 'mailhog/mailhog:latest'
          args:
            - '-invite-jim'
            - '-jim-disconnect=0.1'
            - '-jim-reject-recipient=0.2'
      automountServiceAccountToken: false
status:
  observedGeneration: 1
  replicas: 1
  updatedReplicas: 1
  readyReplicas: 1
  availableReplicas: 1