# Ingress для GooSeek — path-based маршрутизация к микросервисам
# docs/architecture: 02-k3s-microservices-spec.md §4
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: gooseek-ingress
  namespace: gooseek
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
  tls:
    - hosts:
        - gooseek.ru
        - www.gooseek.ru
      secretName: gooseek-tls
  rules:
    - host: gooseek.ru
      http:
        paths:
          - path: /api/v1/discover
            pathType: Prefix
            backend:
              service:
                name: discover-svc
                port:
                  number: 3002
          - path: /api/v1/finance
            pathType: Prefix
            backend:
              service:
                name: finance-svc
                port:
                  number: 3003
          - path: /api/v1/travel
            pathType: Prefix
            backend:
              service:
                name: travel-svc
                port:
                  number: 3004
          - path: /api/v1/library
            pathType: Prefix
            backend:
              service:
                name: library-svc
                port:
                  number: 3009
          - path: /api/v1/collections
            pathType: Prefix
            backend:
              service:
                name: projects-svc
                port:
                  number: 3006
          - path: /api/v1/templates
            pathType: Prefix
            backend:
              service:
                name: projects-svc
                port:
                  number: 3006
          - path: /api/v1/connectors
            pathType: Prefix
            backend:
              service:
                name: projects-svc
                port:
                  number: 3006
          - path: /api/v1/memory
            pathType: Prefix
            backend:
              service:
                name: memory-svc
                port:
                  number: 3010
          - path: /api/v1/create
            pathType: Prefix
            backend:
              service:
                name: create-svc
                port:
                  number: 3011
          - path: /api/v1/export
            pathType: Prefix
            backend:
              service:
                name: create-svc
                port:
                  number: 3011
          - path: /api/v1/search
            pathType: Prefix
            backend:
              service:
                name: search-svc
                port:
                  number: 3001
          - path: /api/v1/tasks
            pathType: Prefix
            backend:
              service:
                name: chat-svc
                port:
                  number: 3005
          - path: /api/v1/patents
            pathType: Prefix
            backend:
              service:
                name: search-svc
                port:
                  number: 3001
          - path: /api/v1/notifications
            pathType: Prefix
            backend:
              service:
                name: notifications-svc
                port:
                  number: 3013
          - path: /api/v1/billing
            pathType: Prefix
            backend:
              service:
                name: billing-svc
                port:
                  number: 3008
          - path: /api/v1/admin
            pathType: Prefix
            backend:
              service:
                name: audit-svc
                port:
                  number: 3012
