# services/bstein-dev-home/ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: bstein-dev-home
  namespace: bstein-dev-home
  annotations:
    kubernetes.io/ingress.class: traefik
    traefik.ingress.kubernetes.io/router.entrypoints: websecure
    traefik.ingress.kubernetes.io/router.tls: "true"
    cert-manager.io/cluster-issuer: letsencrypt
spec:
  tls:
    - hosts: [ "bstein.dev", "chat.ai.bstein.dev" ]
      secretName: bstein-dev-home-tls
  rules:
    - host: bstein.dev
      http:
        paths:
          - path: /api
            pathType: Prefix
            backend:
              service:
                name: bstein-dev-home-backend
                port: { number: 80 }
          - path: /
            pathType: Prefix
            backend:
              service:
                name: bstein-dev-home-frontend
                port: { number: 80 }
    - host: chat.ai.bstein.dev
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: chat-ai-gateway
                port: { number: 80 }
