cetanu / envoy_data_plane

A conversion of envoyproxy/data-plane-api into Python dataclasses using betterproto
MIT License
17 stars 7 forks source link

"@type" parameter configuration in typed_config #24

Closed iMaxGit closed 8 months ago

iMaxGit commented 11 months ago

Hi @cetanu

Thank you for making the envoy data plane functionality available in Python. I am testing this approach to see if it is a viable alternative to writing a bootstrap configuration file for Envoy with Jinja2 templates, which can get a bit messy here.

I am not too familiar with protobuf, but I managed to create a yaml configuration file with some basic settings. However, I am not able to figure out how to create the "@type" parameter entry, as the type_config is Any type.

For example an entry like this:

    access_log:
    - name: envoy.access_loggers.file
      typed_config:
        "@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog

Would it be possible to share an example of how this would look in a Python program?

Thanks.

iMaxGit commented 9 months ago

Solved by modifying betterproto as mentioned here.