envoyproxy / go-control-plane

Go implementation of data-plane-api
Apache License 2.0
1.48k stars 505 forks source link

config_discovery support #960

Open sefaphlvn opened 1 week ago

sefaphlvn commented 1 week ago

Hi all,

Are there any plans to support config_discovery? When I use http_connection_manager with config_discovery, I encounter an error indicating that the control plane does not start.

more info: https://github.com/envoyproxy/go-control-plane/issues/823

valerian-roche commented 1 week ago

Hi, looking at the previous issue it is unclear where the issue lies. Can you indicate:

sefaphlvn commented 1 week ago

I am defining the HttpConnectionManager through configDiscovery within the filter chains and filters, not directly. In fact, I’m providing an ADS (Aggregated Discovery Service) configuration to let configDiscovery learn the setup.

When go-control-plane checks the snapshot, it directly looks for the HttpConnectionManager under the filters. This is the issue because if it doesn’t find it, it reports that no routes were found.

Upon examining the code, I noticed that the getListenerReferences function in pkg/cache/v3/resource does not account for configDiscovery.

If you try to add HttpConnectionManager through configDiscovery, you will understand what I mean.

I am using snapshot and ADS.

valerian-roche commented 1 week ago

From my (limited) understanding of the protocol from envoy documentation, I would not expect this to work within significant rework, as the name becomes a variable not intrinsically linked to the resource served. I already plan on providing a nicer API to pass abstract resources, but those changes will take time and will likely require public API changes, so I do not expect them to be implemented soon.