Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
on-demand, upstream: on-demand cluster discovery #15523
on-demand, upstream: on-demand cluster discovery #15523
Changes from all commits
c9face8
7f7f8e5
e40bdb0
b742a88
e60a784
d20ab69
e791d2b
328f644
1bda75a
b43657e
805b63c
efcf775
cba9977
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
If the only knob here is the presence of a
ConfigSource
, then how will we configure ODCDS when we're using new-style resource names and don't need aConfigSource
because we're using authority-based routing?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.
I think the presence of an OCDS
PerRouteConfig
would indicate we needed to treat the name as on-demand. The meaning ofself
becomes interesting as it might mean two different things for the filter-level config (received from LDS) and thePerRouteConfig
(from RDS).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.
Do we want an explicit disable flag in here? E.g. if it's on globally or at the vhost level but we don't want it at the route level? I think we can add that later but just wanted to point it out.
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.
To disable ODCDS at the route level with current state of things, you could specify the empty config in route's "typed_per_filter_config":
I'll add a test to make sure that disabling works that way.
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.
We need both the ability to disable this on a per-route basis and the ability to handle xdstp names for which no
ConfigSource
needs to be specified. In https://github.com/envoyproxy/envoy/pull/15523/files/b742a88722c205b9fa1d0b694ff010c3d994e7b2#r596505958, @htuch proposed that we use an emptyPerRouteConfig
message for xdstp names; here, you are proposing that we use the same thing to indicate disabling the feature. I don't think this can mean both things.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.
Technically we could have an empty message with an empty
ConfigSource
, but I think this gets confusing. Probably an explicit disable flag would be the way to go.Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Somewhat related to @htuch comments, but why is this public interface needed? Conceptually, something asks the cluster manager to fetch a cluster, and gets a callback when complete or failed. I don't think any of this should be exposed "externally" and should be an internal implementation detail.
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.
Since the config source for the on-demand discovery is provided in the per-route config, which makes it a separate object than CM has from
cds_config
, I need to pass a "CDS" object to CM. It needs to be a public interface, because it's being used inClusterManager
interface. I had two options here: either extend theCdsApi
interface with theupdateOnDemand
function and pass that to CM or create a new interface (OdCdsApi
). I went with the latter, because I found the former to be awkward. It's becauseCdsApi
providesinitialize
,setInitializedCb
andversionInfo
and for the on-demand discovery I would use none of it.