# Ingress for VAPORA (using nginx ingress controller)
# Change the host to your domain
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: vapora
  namespace: vapora
  labels:
    app: vapora
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
    nginx.ingress.kubernetes.io/websocket-services: "vapora-backend"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
    # Optional: cert-manager for TLS
    # cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
  # Uncomment for TLS
  # tls:
  # - hosts:
  #   - vapora.example.com
  #   secretName: vapora-tls
  rules:
  - host: vapora.example.com
    http:
      paths:
      # API endpoints
      - path: /api
        pathType: Prefix
        backend:
          service:
            name: vapora-backend
            port:
              number: 8080
      # WebSocket endpoints
      - path: /ws
        pathType: Prefix
        backend:
          service:
            name: vapora-backend
            port:
              number: 8080
      # MCP server endpoints
      - path: /mcp
        pathType: Prefix
        backend:
          service:
            name: vapora-mcp-server
            port:
              number: 3000
      # Frontend (must be last to catch all)
      - path: /
        pathType: Prefix
        backend:
          service:
            name: vapora-frontend
            port:
              number: 80
