apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: api
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
    nginx.ingress.kubernetes.io/use-regex: "true"
    #nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
  rules:
  - http:
      paths:
      - path: /api/poi(/|$)(.*)
        pathType: Prefix
        backend:
          service:
            name: poi
            port:
              number: 80
      - path: /api/trips(/|$)(.*)
        pathType: Prefix
        backend:
          service:
            name: trips
            port:
              number: 80
      - path: /api/user-java(/|$)(.*)
        pathType: Prefix
        backend:
          service:
            name: userjava
            port:
              number: 80
      - path: /api/user(/|$)(.*)
        pathType: Prefix
        backend:
          service:
            name: userprofile
            port:
              number: 80
# ---
# apiVersion: networking.k8s.io/v1
# kind: Ingress
# metadata:
#   name: insurance-web-ingress
#   namespace: insurance-web
#   annotations:
#     kubernetes.io/ingress.class: nginx
#     nginx.ingress.kubernetes.io/ssl-redirect: "false"
#     nginx.ingress.kubernetes.io/use-regex: "true"
#     #nginx.ingress.kubernetes.io/rewrite-target: /$1
# spec:
#   rules:
#   - http:
#       paths:
#       - path: /(.*|$)
#         pathType: Prefix
#         backend:
#           service:
#             name: tripviewer-service
#             port:
#               number: 80