Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Illegal map value with envoy v3 about typed_config http connection manager

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

like image 484
TheTisiboth Avatar asked May 21 '21 11:05

TheTisiboth


1 Answers

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

like image 132
Peter Wishart Avatar answered Sep 28 '22 05:09

Peter Wishart