apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-service
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/use-regex: "true"
  labels:
    name: ingress-service
spec:
  rules:
    - host: relace.dev
      http:
        paths:
          - pathType: Prefix
            path: "/api/display/?(.*)"
            backend:
              service:
                name: display-service
                port:
                  number: 3000
          - pathType: Prefix
            path: "/api/auth/?(.*)"
            backend:
              service:
                name: auth-service
                port:
                  number: 3000
          - pathType: Prefix
            path: "/api/accounts/?(.*)"
            backend:
              service:
                name: account-service
                port:
                  number: 3000
          - pathType: Prefix
            path: "/api/items/?(.*)"
            backend:
              service:
                name: item-service
                port:
                  number: 3000
          - pathType: Prefix
            path: "/api/orders/?(.*)"
            backend:
              service:
                name: order-service
                port:
                  number: 3000
          - pathType: Prefix
            path: "/api/payments/?(.*)"
            backend:
              service:
                name: payment-service
                port:
                  number: 3000
          - pathType: Prefix
            path: "/api/items/?(.*)/reviews/?(.*)"
            backend:
              service:
                name: review-service
                port:
                  number: 3000
          - pathType: Prefix
            path: "/?(.*)"
            backend:
              service:
                name: client-service
                port:
                  number: 3000
