I am following this tutorial, in order to have a gRPC service transcoded to HTTP. However, it is not up to date, since it uses envoy API v2, but this is not anymore available (I am getting an error saying this), they are now using the v3. Therefore, the syntax is slightly different.
For the v2, this snippet has no syntax error, however, it raises an error saying that the V2 is not available anymore (so it is not usable in the end):
- name: envoy.http_connection_manager
config:
...
According to this example, the way of having an HTTP connection manager (which is v3 compliant) would be to do like this, in an envoy.yml
configuration file (we are explicitly telling that we are using the v3):
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
However, I am getting an Illegal map value
error pointing on the "@type"
:
error initializing configuration '/etc/envoy/envoy.yaml': yaml-cpp: error at line 15, column 17: illegal map value
I also have tried to force envoy to use the V2, with the flag --bootstrap-version 2
, but it keeps saying that the v2 is no longer in use, so the only way of using envoy now is to use the v3.
Do you have experienced the same issue ?
My goal is just to have an rGPC service transcoded to HTTP.
If you need more materials to figure out the problem, I uploaded the whole project on GitHub
Yes, its a bit of a pain. There's an online envoy config checker that helps a bit in determining exactly which versions ditch backwards compatability.
You have correctly switched from the legacy config
to typed_config
data.
However, it looks like you inadvertently included a tab in your latest config (line 15) which causes illegal map value
.
You also need to migrate clusters/hosts
section to load_assignments
like this:
load_assignment:
cluster_name: grpc-backend-services
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 127.0.0.1
port_value: 53000
There's a good example in the current envoy docs: https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/grpc_json_transcoder_filter
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With