apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-service
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/use-regex: "true"
spec:
  rules:
    - host: bapana.xyz
      http:
        paths:
          - path: /api/users/?(.*)
            pathType: Prefix  
            backend:
              service:
                name: auth-service
                port:
                  number: 3000
          - path: /api/squads/?(.*)
            pathType: Prefix  
            backend:
              service:
                name: squad-service
                port:
                  number: 3000
          - path: /api/releases/?(.*)
            pathType: Prefix  
            backend:
              service:
                name: release-service
                port:
                  number: 3000
          - path: /api/sprints/?(.*)
            pathType: Prefix  
            backend:
              service:
                name: sprint-service
                port:
                  number: 3000
          - path: /api/retros/?(.*)
            pathType: Prefix  
            backend:
              service:
                name: retro-service
                port:
                  number: 3000
          - path: /api/leaves/?(.*)
            pathType: Prefix  
            backend:
              service:
                name: capacity-service
                port:
                  number: 3000
          - path: /api/estimation/?(.*)
            pathType: Prefix  
            backend:
              service:
                name: estimation-service
                port:
                  number: 3000
          - path: /socket.io/?(.*)
            pathType: Prefix  
            backend:
              service:
                name: planner-service
                port:
                  number: 3000
          - path: /?(.*)
            pathType: Prefix  
            backend:
              service:
                name: client-service
                port:
                  number: 3000
