apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    # add an annotation indicating the issuer to use.
    cert-manager.io/cluster-issuer: digitalocean-dns
  name: whoami-wildcard-root
  namespace: traefik-system
spec:
  rules:
  - host: ${WHOAMI_DOMAIN}
    http:
      paths:
        # Block all paths execept for / (Blocks ddos via /data)
      - pathType: Exact
        path: /
        backend:
          service:
            name: whoami-wildcard-root
            port:
              number: 80
  tls:
  - hosts:
    # DNS_ZONE can be a wildcard domain *.example.com or the same as WHOAMI_DOMAIN
    - "${DNS_ZONE}"
    secretName: whoami-wildcard-root-tls 
