harsimranmaan / envoy-jsonnet

Jsonnet bindings for envoyproxy
3 stars 0 forks source link

Missing extension types #2

Open radriaanse opened 1 year ago

radriaanse commented 1 year ago

Thanks for the great library!

One thing I noticed however is that, besides the envoy.extensions.transport_sockets.tls.v3, all other extensions appear to be missing from the generated output; and that transport_socket extension also misses some fields (UpstreamTlsContext i.e.).

I don't see any apparent difference between the proto definitions, do you know why the generation isn't including them?

harsimranmaan commented 1 year ago

Hey @radriaanse, thanks for trying it out. https://github.com/envoyproxy/envoy/blob/637e858493b2883caf8298042800e839583cee3a/api/envoy/config/bootstrap/v3/bootstrap.proto#L18 has a ref to the bits inenvoy.extensions.transport_sockets and since the current lib is indexed at the bootstrap.proto, it only traverses the deps from the root. Having said that, I think it'll be worth including the extensions.

harsimranmaan commented 1 year ago

Hey @radriaanse, please check the latest publish which now includes extensions

radriaanse commented 1 year ago

Works like a charm ❤️

Followup question, it's probably not possible to get the value of things like the filter name and URL, right? Because the typed_config is Any and the extension URL doesn't seem to be defined anywhere in the protobuf besides some doc strings.

Would be nice if that's an option though, allowing you to do something like;

envoy.config.listener.v3.Filter.withName('test')
+ envoy.config.listener.v3.Filter.withTypedConfig(
  envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
)

yielding:

{
  "name": "test",
  "typed_config": {
    "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager"
  }
}
harsimranmaan commented 1 year ago

Would you like to file it on upstream https://github.com/splunk/protobuf-jsonnet? Even better if you'd like to submit an enhancement :)