-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strip Config of all service specific configuration for now #694
Conversation
307037b
to
3a95f1d
Compare
11e3216
to
d385802
Compare
d385802
to
7828a1f
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Build Succeeded 🥳 Build Id: 50545872-e0f6-45dc-ae54-1ada4f310103 The following development images have been built, and will exist for the next 30 days: To build this version:
|
@@ -59,34 +55,17 @@ pub(crate) const CONNECTION_TIMEOUT: u64 = 5; | |||
#[serde(deny_unknown_fields)] | |||
#[non_exhaustive] | |||
pub struct Config { | |||
#[serde(default = "Slot::<Admin>::with_default")] | |||
pub admin: Slot<Admin>, | |||
#[serde(default)] | |||
pub clusters: Slot<ClusterMap>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(non blocking) what are your thoughts on keeping static cluster config? (since it's proxy specific)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well clusters is one of the least proxy specific pieces of information because the control plane and relay create a cluster map for proxies to consume through xDS.
We do still have static configuration, the API just also handles being updated through other sources if provided, unless I'm missing the question?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes - that is a good point - everyone needs clusters/endpoints, so it's not actually proxy specific 👍🏻
Question answered!
More work on #600. This removes all service specific configuration from
Config
(well specifically non-shared service configuration, filters is still there because filters are shared between services even though only proxy uses them), as currentlyConfig
is a little too proxy focused, and with the introduction of a third service, I wanted to restrictConfig
to just what is currently shared between all services, and service specific configuration should be set using CLI or environment parameters (or using thecli
from the lib). This also removes xds' dependence onConfig
in order to better support running multiple types of clients and different services handling resource updates differently.We could always later reintroduce these properties into
Config
when we've set up a good way to actually handle updates to these properties as they're currently only set once (such as binding new sockets when the port changes), but I think we should do that after #600 is finished.