Closed
Description
Support Exact
PathMatchType
in HTTPRoute resource. See https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.PathMatchType
Acceptance criteria:
- Implement exact matching
- Ensure NKG rejects any values invalid for NGINX
- Ensure a test based on this https://github.com/kubernetes-sigs/gateway-api/blob/7631139b1ea4beaf575a49f56c56aa26f1e11e22/conformance/tests/httproute-exact-path-matching.go#L33 can pass
- Ensure if two rules have the same path (one rule has prefix matching and one has exact matching), matching works as expected (see below)
- Ensure that if two rules have the same exact path but have different matches based on headers or other request params, matching works as expected.
- Update the doc https://github.com/nginxinc/nginx-kubernetes-gateway/blob/main/docs/gateway-api-compatibility.md
Appendix:
Two locations with the same path but different matching (exact and prefix)
location = /hello {
return 200 "exact hello\n";
}
location /hello {
return 200 "prefix hello\n";
}
curl localhost:8090/hello
exact hello
curl localhost:8090/hello/abc
prefix hello
Aha! Link: https://nginx.aha.io/features/NKG-60