envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.72k stars 4.75k forks source link

Understanding the purpose of GetConfigTracker() on admin interface. #35582

Closed ppourali closed 5 hours ago

ppourali commented 1 month ago

Title: What is the purpose of GetConfigTracker() on admin interface?

Description:

Hi all,

We are currently exploring options to get Config update notifications and found that there is an GetConfigTracker() on the server_context.admin().

The documentation is not clear what this map is. Can we add our own callbacks to be run when the config is updated? e.g., when listeners are updated do xyz(). https://github.com/envoyproxy/envoy/blob/main/source/server/admin/config_tracker_impl.h

To give you more context: We have a bootstrap extension from which we want to get notified on the config updates (mostly listeners updates from xds) and perform some operation (within the bootstrap extension instance). I know that there is an xds configtracker extension for this purpose too. However, from our Bootstrap extension instance, we do not seem to be easily have access to the xds configtracker extension instance or the xds config tracker extension instance does not seem to have access to the bootstrap extension instance to call an operation on it. Therefore, I think this configtracker() on the admin() interface which is accessible from the Bootstrap extension instance (i.e., Server_factory_context.admin().config_tracker() ) might be something of interest for us.

Thanks, Parsa

RyanTheOptimist commented 1 month ago

@jmarantz

jmarantz commented 1 month ago

I do not know the origin of that function, or that it even existed. But my guess is that it was added a very long time ago to the admin interface, but probably shouldn't be there. It looksl ike it might be better suited to be on the Server object?

@mattklein123 @htuch for the history of that.

htuch commented 1 month ago

Config tracker was introduced in https://github.com/envoyproxy/envoy/commit/24297974e479929568115a3dbce06c4e8f698f5a. What is preventing the xDS config tracker updates from a bootstrap extension?

CC @adisuissa

ppourali commented 1 month ago

On a more general note, is there any way to get the xds_config_tracker_extension instance from a bootstrap extension instance or vice versa (i.e., get the bootstrap extension instance from the xds_config_tracker_extension instance ) ? Do these two have somehow visibility/navigability to each other?

github-actions[bot] commented 1 week ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

github-actions[bot] commented 5 hours ago

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.