VictoriaMetrics / VictoriaMetrics/operator
HTTPRoute extraRules inherit matches/filters from previous rules
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 589
- Forks
- 229
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 77
Description
The operator renders spec.httpRoute.extraRules incorrectly when a CR defines multiple rules.
Example input:
spec:
httpRoute:
parentRefs:
- name: example-gateway
hostnames:
- example.com
extraRules:
- matches:
- path:
type: PathPrefix
value: /a
filters:
- type: RequestHeaderModifier
requestHeaderModifier:
add:
- name: x-scope
value: "a"
- matches:
- path:
type: PathPrefix
value: /b
Expected behavior
spec.rules[1] contains only the second match (/b) and no filters.
Actual behavior
spec.rules[1] contains the second match (/b) plus the filters from the first rule (x-scope: a). If the second entry omits matches, it also keeps the first entry's matches.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the HTTPRoute rendering path for spec.httpRoute.extraRules and reproduce the supplied CR example. Verify that each rendered rule uses only its own matches and filters, including when either field is omitted; done means later rules no longer inherit fields from earlier rules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100