kuma icon indicating copy to clipboard operation
kuma copied to clipboard

Support direct responses in `MeshGatewayRoute`

Open michaelbeaumont opened this issue 2 years ago • 2 comments

Description

This is a generally useful feature but is especially motivated by the following:

The Gateway API docs specify that invalid BackendRefs cannot be simply ignored but must exist in the proxy configuration in order to return 5xx errors. At the moment, invalid references are simply skipped when converting to MeshGatewayRoute, so this behavior isn't possible.

--- FAIL: TestConformance/HTTPRouteInvalidCrossNamespaceBackendRef/HTTP_Request_to_invalid_cross-namespace_backend_must_receive_a_500 (30.00s)
            httproute-invalid-cross-namespace-backend-ref.go:61: Making GET request to http://172.18.0.3:30080/
            http.go:159: Response expectation failed, not ready yet: expected status code to be 500, got 404

Supporting this will likely entail support in MeshGatewayRoute to return a response directly from the proxy.

Without this we cannot pass some of the conformance tests. See also #4597

michaelbeaumont avatar Jul 19 '22 09:07 michaelbeaumont

@michaelbeaumont I like to work on this. do we also want to send any message to the user other than the status 500

tharun208 avatar Jul 28 '22 14:07 tharun208

@tharun208 OK! No, the important part is returning a status in place of a backend. For example, I should be able to create a route that returns a 202 status 33% of the time and forwards the request to a service the other 66% of the time. Get in touch on slack if you need pointers/help.

michaelbeaumont avatar Jul 28 '22 16:07 michaelbeaumont

This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.

github-actions[bot] avatar Nov 10 '22 08:11 github-actions[bot]

Superseeded by #5798

lahabana avatar Jan 24 '23 11:01 lahabana