Noticed a potential conflict with how the PathPrefix on Http Routes is documented. Wanted to see if I was losing my mind or not.
Note: all assumptions are based on the two below Ingress rules.
The documentation here (See the 'Path vs PathPrefix' box) suggests that PathPrefix is greedy.
Knowing that, I would expected thes requests would be routed as follows: (And this matches what I am seeing with Traefik 2.10.5)
GET /aut -> myservice
GET /auth -> keycloak
GET /authentication -> keycloak
GET /authabc -> keycloak
While the documentation from Kubernetes seems to indicate otherwise (see the '/aaa/bbbxyz' rule)
With that, I would expect the following routing to occur:
GET /aut -> myservice
GET /auth -> keycloak
GET /authentication -> myservice
GET /authabc -> myservice
Is the K8S documentation wrong?
Edit: I was curious about the actual greediness of PathPrefix to I tweaked the tests a bit to find out:
Those tests continue to pass which tells me PathPrefix is greedy.
Catch-All Ingress Rule:
spec:
ingressClassName: traefik
rules:
- host: myhost.mydomain.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: myservice
port:
name: http
Ingress Rules:
spec:
ingressClassName: traefik
rules:
- host: myhost.mydomain.com
http:
paths:
- path: /auth
pathType: Prefix
backend:
service:
name: keycloak
port:
name: http