Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPRouteFilter direct response does not work #4998

Closed
ovaldi opened this issue Jan 3, 2025 · 11 comments
Closed

HTTPRouteFilter direct response does not work #4998

ovaldi opened this issue Jan 3, 2025 · 11 comments
Labels
Milestone

Comments

@ovaldi
Copy link

ovaldi commented Jan 3, 2025

EG version: v1.2.4
K8s version: v1.31

image image image
@ovaldi ovaldi added the triage label Jan 3, 2025
@arkodg
Copy link
Contributor

arkodg commented Jan 3, 2025

you shouldnt be specifying a backendRef for this case, and if you do, it should be a valid one (still will have no effect and directResponse will kick in), if Envoy Gateway finds any invalid config (non existent backend maps to invalid config), if adds a directResponse of 500, closing this one since it working as designed, feel free to reopen if you have futher questions

@arkodg arkodg closed this as completed Jan 4, 2025
@ovaldi
Copy link
Author

ovaldi commented Jan 4, 2025

you shouldnt be specifying a backendRef for this case, and if you do, it should be a valid one (still will have no effect and directResponse will kick in), if Envoy Gateway finds any invalid config (non existent backend maps to invalid config), if adds a directResponse of 500, closing this one since it working as designed, feel free to reopen if you have futher questions

@arkodg I think there is misunderstood, the backendRef in the picture belongs to another rule, and the backendRef is valid. (maybe K9s' screenshot misled you)
What I need is that all OPTIONS requests return 200 directly, and other requests are handled by backendRef.

image

@arkodg arkodg reopened this Jan 4, 2025
@ovaldi
Copy link
Author

ovaldi commented Jan 4, 2025

I tried many times and check the code, didn't find a solution.

@arkodg
Copy link
Contributor

arkodg commented Jan 6, 2025

@ovaldi do you have multiple routes referencing the same filter ? you maybe hitting #4989

@ovaldi
Copy link
Author

ovaldi commented Jan 7, 2025

@ovaldi do you have multiple routes referencing the same filter ? you maybe hitting #4989

@arkodg I have multiple routes but only one filter eg-cors-filter and only one route references it.

@arkodg arkodg added this to the v1.3.0 milestone Jan 10, 2025
@guydc
Copy link
Contributor

guydc commented Jan 29, 2025

@ovaldi - it seems like the HTTPRouteFilter has no namespace, so it's probably applied in the default namespace in your cluster. The filter should be in the same namespace as your route, which is in envoy-gateway-system.

@ovaldi
Copy link
Author

ovaldi commented Jan 29, 2025

@ovaldi - it seems like the HTTPRouteFilter has no namespace, so it's probably applied in the default namespace in your cluster. The filter should be in the same namespace as your route, which is in envoy-gateway-system.

Hi @guydc I double-checked that the HTTPRouteFilter exists in the same namespace.
We use helm chart to deploy & upgrade gateway templates and specify namespace -n envoy-gateway-system

@guydc
Copy link
Contributor

guydc commented Jan 29, 2025

Thanks @ovaldi.

Can you please provide a more standalone step-by-step reproduction of the issue? e.g. install Envoy Gateway version X with Y helm values and apply resources Z (Gateway, Route, Filters in a yaml format [not picture])?

@ovaldi
Copy link
Author

ovaldi commented Feb 1, 2025

Thanks @ovaldi.

Can you please provide a more standalone step-by-step reproduction of the issue? e.g. install Envoy Gateway version X with Y helm values and apply resources Z (Gateway, Route, Filters in a yaml format [not picture])?

We were previously using EG v1.1.1 and recently upgraded to v1.2.4

helm install eg oci://docker.io/envoyproxy/gateway-helm \
  --version v1.1.1 -n envoy-gateway-system --create-namespace \
  --set deployment.replicas=3
helm upgrade eg oci://docker.io/envoyproxy/gateway-helm \
  --version v1.2.4 -n envoy-gateway-system \
  --set deployment.replicas=3

I will try to provide a demo yaml after my vacation, thank you @guydc

@arkodg arkodg modified the milestones: v1.3.0, v1.4.0-rc.1 Feb 6, 2025
@ovaldi
Copy link
Author

ovaldi commented Feb 28, 2025

Hi @guydc I cannot reproduce this issue in the Test cluster, this issue can only reproduce in the Prod cluster. (Same K8s version & Same EG version)

Anyway, I will close this issue until I can reproduce it in the Test cluster.

@ovaldi ovaldi closed this as completed Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants