Search code examples
envoyproxy

Envoy configuration. Possible values of @type keys


I'm trying to understand how the @type key is used and where can I get its values.

For example, following a simple example of a front-proxy from the docs.

In the configuration sets the listeners and then the filter chains. Here in the typed_config I undestand that the "@type" key is needed to specify what type of filter we are using.

What I don't fully understand is where these values came from

In the case mentioned before, the configuration uses: "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager

But going to the API link in the documentation for The HttpConnectionManager it seems that the type is different [extensions.filters.network.http_connection_manager.v3.HttpConnectionManager proto]

To me this seems like a v2 -> v3 change and that the doc examples are fully updated. But is there any place where its explained where these types came from and what values are valid?


Solution

  • Well, this answer isn't great - but I think that's largely because there isn't a great single source for this information.

    Each typed_config is a protobuf message of type any which is just an arbitrary serialized message. Envoy uses the type to match it against known protobuf definitions for the filters. The specific type for each one can in some cases be found in the docs:

    For those not documented there, you can parse your way into the code and find the type, e.g. again for the aws filter

    Some of Envoy's other open projects that need to reference these types frequently hold definitions of well known types. You can use that as a reference, just note they may not be 100% up to date.

    Sorry there isn't a more consolidated location, hope this helps.