gateway icon indicating copy to clipboard operation
gateway copied to clipboard

feat: Direct Response

Open Demacr opened this issue 1 year ago • 7 comments

What this PR does / why we need it: I decided to add Direct Response due to making endpoint stubs after deleting services. I found that #2714 issue has information that GW API still in development to add direct response and there is a way to workaround by EnvoyPatchPolicy. So I've implemented new CRD which can be used as backendRef in HTTPRoute.

p.s.: this PR is a draft, I'll add documentation later. Will be glad to discuss about conception of this solution.


Fixed #2714

Demacr avatar Jul 31 '24 15:07 Demacr

Can this be part of the Backend API ?

seems not

zirain avatar Aug 01 '24 08:08 zirain

Should we add a new CRD to support one feature ? In a long run, will it cause the API maintaince issues ?

Xunzhuo avatar Aug 01 '24 08:08 Xunzhuo

Can this be part of the Backend API ?

@Xunzhuo Firstly, I thought about it but it will require so many changes and it won't look good by architect.

Should we add a new CRD to support one feature ? In a long run, will it cause the API maintaince issues ?

@Xunzhuo due to direct response gonna be part of Gateway API it's temporary solution for such functionality. But realization in GW API is unpredictable of time, like one guy took responsibility to add and since April no updates. After implementation in GW API's side it could be deleted or kept for backward compatibility.

Demacr avatar Aug 01 '24 14:08 Demacr

we'll have to unfortunately have to wait until the API is available in Gateway API i suggest using https://gateway.envoyproxy.io/docs/tasks/extensibility/envoy-patch-policy/ as a workaround until then

arkodg avatar Aug 01 '24 15:08 arkodg

we'll have to unfortunately have to wait until the API is available in Gateway API i suggest using https://gateway.envoyproxy.io/docs/tasks/extensibility/envoy-patch-policy/ as a workaround until then

is there an issue on upstream?

zirain avatar Aug 02 '24 02:08 zirain

@zirain do you mean this one?

Demacr avatar Aug 02 '24 08:08 Demacr

ive raised https://github.com/envoyproxy/gateway/issues/4120 to discuss how we can move forward for Direct Response, hoping to get some consensus on the issue, before we can move forward with the implementation

arkodg avatar Aug 29 '24 01:08 arkodg

@arkodg should we close this, and move to HTTPRouterFilter?

zirain avatar Sep 17 '24 11:09 zirain

@arkodg should we close this, and move to HTTPRouterFilter?

yeah @zirain that makes sense, closing this PR, @Demacr if you're still interested on adding support for Direct Response, can you raise another PR to add the feature as a field to HTTPRouterFilter

arkodg avatar Sep 17 '24 18:09 arkodg