apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: mailhog
  annotations:
    kubernetes.io/ingress.class: nginx
    # type of authentication
    nginx.ingress.kubernetes.io/auth-type: basic
    # name of the secret that contains the user/password definitions
    nginx.ingress.kubernetes.io/auth-secret: mailhog-secret
    # message to display with an appropiate context why the authentication is required
    nginx.ingress.kubernetes.io/auth-realm: "Authentication Required for MailHog"
spec:
  rules:
  - host: "mailhog.eni.yannig.ovh"
    http:
      paths:
      - path: /
        backend:
          serviceName: mailhog
          servicePort: 8025
  tls:
    - secretName: eni-yannig-ovh-prod-tls
      hosts:
        - "mailhog.eni.yannig.ovh"
