# K8s Ingress for mail.squaremcp.com
# Routes webmail/admin traffic to the existing poste.io service in the email namespace
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: squaremcp-mail-ingress
  namespace: email
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod
    nginx.ingress.kubernetes.io/proxy-body-size: "50m"
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
spec:
  ingressClassName: nginx
  rules:
    - host: mail.squaremcp.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: complete-mail-service
                port:
                  number: 80
  tls:
    - hosts:
        - mail.squaremcp.com
      secretName: mail-squaremcp-tls
