---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: whoami
  namespace: whoami
  annotations:
    kubernetes.io/ingress.class: "traefik"
    traefik.ingress.kubernetes.io/router.entrypoints: "websecure"
    # traefik.ingress.kubernetes.io/router.middlewares: "kube-system-traefik-real-ip@kubernetescrd"
    cert-manager.io/cluster-issuer: "letsencrypt-production"
spec:
  tls:
    - secretName: whoami-tls
      hosts:
        - "whoami.${SECRET_DOMAIN}"
  rules:
    - host: "whoami.${SECRET_DOMAIN}"
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: whoami
                port:
                  number: 80
