apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: kt-event-marketing
  annotations:
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
    nginx.ingress.kubernetes.io/use-regex: "true"
spec:
  ingressClassName: nginx
  rules:
    - host: kt-event-marketing-api.20.214.196.128.nip.io
      http:
        paths:
          # User Service
          - path: /api/v1/users
            pathType: Prefix
            backend:
              service:
                name: user-service
                port:
                  number: 80

          # Content Service
          - path: /api/v1/content
            pathType: Prefix
            backend:
              service:
                name: content-service
                port:
                  number: 80

          # Event Service
          - path: /api/v1/events
            pathType: Prefix
            backend:
              service:
                name: event-service
                port:
                  number: 80

          - path: /api/v1/jobs
            pathType: Prefix
            backend:
              service:
                name: event-service
                port:
                  number: 80

          - path: /api/v1/redis-test
            pathType: Prefix
            backend:
              service:
                name: event-service
                port:
                  number: 80

          # AI Service
          - path: /api/v1/ai-service
            pathType: Prefix
            backend:
              service:
                name: ai-service
                port:
                  number: 80

          # Participation Service
          - path: /api/v1/participations
            pathType: Prefix
            backend:
              service:
                name: participation-service
                port:
                  number: 80

          - path: /api/v1/winners
            pathType: Prefix
            backend:
              service:
                name: participation-service
                port:
                  number: 80

          - path: /debug
            pathType: Prefix
            backend:
              service:
                name: participation-service
                port:
                  number: 80

          # Analytics Service - Event Analytics
          - path: /api/v1/events/([0-9]+)/analytics
            pathType: ImplementationSpecific
            backend:
              service:
                name: analytics-service
                port:
                  number: 80

          # Analytics Service - User Analytics
          - path: /api/v1/users/([0-9]+)/analytics
            pathType: ImplementationSpecific
            backend:
              service:
                name: analytics-service
                port:
                  number: 80

          # Distribution Service
          - path: /distribution
            pathType: Prefix
            backend:
              service:
                name: distribution-service
                port:
                  number: 80
