kubernetes-sigs / kubernetes-sigs/gateway-api
Clarify ReplacePrefixMatch behavior when prefix match is set to /
- Dominant language
- Go
- Stars
- 3k
- Forks
- 789
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 45
Description
**What would you like to be added**:
There are currently no examples for when `ReplacePrefixMatch` is set to `/`.
I know that in these cases it would probably make more sense to use `ReplaceFullPath` but it would be nice to have a proper behavior defined.
What I'm thinking should happen is:
| Request Path | Prefix Match | Replace Prefix | Modified Path |
| --- | --- | --- | --- |
| /foo | / | /xyz | /xyz/foo |
**Why this is needed**:
I found a gateway implementation (AWS ALB controller) that returns what I think is the incorrect modified path for the example above (it returns `/xyzfoo`). And I think it's important to have that cleared up in the docs in order to open a bug report if their behavior is currently incorrect.
Contributor guide
Research direction
Start by locating the Gateway API documentation for ReplacePrefixMatch and review how prefix replacement behavior is currently described. Add an explicit example for a prefix match of `/`, including the expected `/xyz/foo` result, so the behavior is clear enough to compare with the AWS ALB controller.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, kubernetes
- Domain
- api, documentation, networking
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100