apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: kafka-cqrs-ingress
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/rewrite-target: $1$2
    nginx.ingress.kubernetes.io/configuration-snippet: |
      rewrite ^/(gui)$ $1/index.html redirect;
spec:
  rules:
  - http:
      paths:
      - path: /gui(/|$)(.*)
        pathType: Prefix
        backend:
          service:
            name: gui-service
            port:
              number: 80
      - path: /notifier(/|$)(.*)
        pathType: Prefix
        backend:
          service:
            name: notifier-service
            port:
              number: 8081
      - path: /reader(/|$)(.*)
        pathType: Prefix
        backend:
          service:
            name: reader-service
            port:
              number: 8082
      - path: /producer(/|$)(.*)
        pathType: Prefix
        backend:
          service:
            name: producer-service
            port:
              number: 8083
      - path: /debugger(/|$)(.*)
        pathType: Prefix
        backend:
          service:
            name: debugger-service
            port:
              number: 9090
