Support gRPC-JSON transcoder
Description: For now, Envoy-Gateway has GRPCRoute. And in some contexts, We need to call from the client(maybe browser, mobile ...) to service. And it calls with HTTP protocol by Restfull. Can we consider about gRPC-JSON transcoder to make GRPCRoute can call with HTTP.
https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/grpc_json_transcoder_filter
can EnvoyPatch help with this?
can EnvoyPatch help with this? Hi @zirain How the way can it help?
@quyenhoang96 as a workaround you should be able to define any xds resource using https://gateway.envoyproxy.io/v0.5.0/user/envoy-patch-policy.html
In https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/grpc_json_transcoder_filter . It need to bin file. How to workaround bin file to envoy-proxy can read it.
assigning to @AliceProxy who is interested in implementing this one, thanks !
This issue has been automatically marked as stale because it has not had activity in the last 30 days.
there are two options here
- we can leverage the existing feature in envoy which is based on the user generating the static proto descriptor sets https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/grpc_json_transcoder_filter#how-to-generate-proto-descriptor-set
- or rely on a reflection endpoint https://github.com/envoyproxy/envoy/pull/23061 (Envoy PR needs to be taken forward)
This issue has been automatically marked as stale because it has not had activity in the last 30 days.
This issue has been automatically marked as stale because it has not had activity in the last 30 days.
I'd like to take a crack at this. I'm new to the repo. Are there any somewhat similar feature additions that someone could link to for me to use as a template for navigating the codebase?
thanks for looking into this one @ouillie, ideally would like https://github.com/envoyproxy/envoy/pull/23061 to land first in upstream so its improves UX here
FYI the filter has a proto_descriptor_bin inline option as well as the proto_descriptor file reference option, and I believe that could already work fine with a patch policy for small services.
with the bin option we are limited to the max size of ConfigMap
@arkodg Given that the gRPC reflection issue has been outstanding for over a year and appears to lack active contributors, perhaps we should avoid holding up this feature on that PR. We might consider proceeding without waiting for progress on grpc reflection, or alternatively raise it separately if it remains important.
if the proto descriptor bin for majority cases is less than 1MB and fits in a ConfigMap, this approach will work, hoping someone can pick this issue up and do this analysis and make sure this approach is useful for most cases
In our setup we have 90+ services, each with its own transcoder. The proto descriptor binaries average ~120 KB in size, with the largest we’ve seen around 360 KB. This suggests the proposed approach should work reliably in practice, since the descriptor size remains well within the ConfigMap limit.
At the moment we use Istio EnvoyFilter to inject transcoders into sidecars, which gives individual teams the flexibility to manage their own transcoders. As we migrate to Envoy Gateway, relying on EnvoyPatchPolicy for this would mean exposing powerful configuration options to all teams, which carries the risk of accidental or insecure changes at the gateway level.
For us, this feature directly addresses that gap by providing a safe, scalable alternative.
thanks for sharing this data @nfarhadian, marking this issue as help wanted @ouillie are you still interested in picking this one up ?