I have a Kubernetes ingress configuration that uses nginx as Ingress Controller.
The Ingress template has a for loop that picks up the paths that I define in the values.yaml file as well as the type of path (Prefix or Exact) and for each adds the backend section, so in the end I end with a bunch of entries like this:
spec:
ingressClassName: nginx
rules:
- host: my.host
http:
paths:
- backend:
service:
name: "my-service"
port:
number: <some number>
path: /base-url/endpoint1
pathType: Exact
- backend:
service:
name: "my-service"
port:
number: <some number>
path: /base-url/endpoint2
pathType: Prefix
Problem is imagine my endpoint1 which uses Exact has subpaths, for example /base-url/endpoint1/get-something.
With the Exact matching I am expecting if I do a call to /base-url/endpoint1/get-something it would not work, but it's working, the Ingress is directing traffic to subpaths.
Does anyone know why this happens?