-
Notifications
You must be signed in to change notification settings - Fork 708
Closed
Labels
Description
Description:
When generating an HTTPRoute with filters defined at both HTTPRoute/Rule and HTTPRoute/Rule/BackendRef levels, Envoy creates clusters at the HTTPRoute/Rule/BackendRef level but incorrectly maps the route to a non-existent HTTPRoute/Rule level cluster.
Example HTTPRoute Manifest
spec:
rules:
- backendRefs:
- filters:
- requestHeaderModifier:
remove:
- X-Unused
type: RequestHeaderModifier
group: ""
kind: Service
name: eg-validator-default
port: 8080
weight: 90
- filters:
- requestHeaderModifier:
remove:
- X-Unused
type: RequestHeaderModifier
group: ""
kind: Service
name: eg-validator-canary
port: 8080
weight: 10
filters:
- type: URLRewrite
urlRewrite:
path:
replacePrefixMatch: /
type: ReplacePrefixMatch
matches:
- path:
type: PathPrefix
value: /v1
Observed Envoy Cluster Config
Clusters created:
httproute/devops/eg-validator-internal/rule/0/backend/0
httproute/devops/eg-validator-internal/rule/0/backend/1
Route mapped to:
httproute/devops/eg-validator-internal/rule/0 (which is not exists)
Note:
- We encountered this issue when applying only a URLRewrite filter in HTTPRoute/Rule.
- We wants to add the filter at HTTPRoute/Rule/BackendRef, to generate the clusters at backend level. Ref: Option to generate clusters at HTTPRoute/Rule/BackendRef level #7017
Repro steps:
- Create an HTTPRoute as shown in the example spec with filters at both BackendRef and Rule levels.
- Apply the configuration to Envoy Gateway.
- Inspect the generated Envoy cluster and route configuration.
- Notice that the route points to a cluster name which is not exists.
Environment:
Kubernetes Version: 1.31
Envoy Gateway Version: 1.5.0
Gateway API Version: 1.3.0
Reactions are currently unavailable