-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
Description
Currently, there are a few ways to create an xDS client
xdsclient.New: This uses bootstrap configuration defined by the env varsxdsclient.NewWithConfig: This uses bootstrap configuration provided to it, if the bootstrap env vars are not defined.
This approach means that resolvers like google_c2p end up creating an xDS client even though they really don't need one. This is because they generate their own bootstrap configuration, and the only way to have the xDS client created with that configuration is to actually go ahead and create it.
Instead, if we have a way in the xdsclient package to set the global bootstrap configuration (for the process), then we can have resolvers like google_c2p simply set the configuration and not have to create an xDS client.
If we take this approach, we can also get rid of xdsclient.NewWithConfig and only have xdsclient.New.