Skip to content

vhds: add support for initial xdstp collection - #44129

Open
sschepens wants to merge 43 commits into
envoyproxy:mainfrom
sschepens:vhds-xdstp-collection
Open

sschepens wants to merge 43 commits into
envoyproxy:mainfrom
sschepens:vhds-xdstp-collection

Conversation

@sschepens

@sschepens sschepens commented Mar 26, 2026 •

Copy link
Copy Markdown
Contributor

Submitting this for initial review.

Adds support for specifying an initial xdstp collection in VHDS (default_virtual_host_resource_locator), to allow subscribing to an initial resource set, this enables VHDS usage without the need for on-demand. When this field is set, on-demand VHDS updates are disabled and non-matching requests on this RouteConfiguration will just return 404.

Additional Description:
Risk Level: medium
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

@repokitteh-read-only

Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @mattklein123
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #44129 was opened by sschepens.

see: more, trace.

@sschepens

Copy link
Copy Markdown
Contributor Author

cc @markdroth @adisuissa since I've been chatting to you about this

@sschepens
sschepens force-pushed the vhds-xdstp-collection branch 4 times, most recently from b35e941 to 014538f Compare March 27, 2026 13:18

@adisuissa adisuissa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

High-level comment: as this is an xDS-TP based subscription, it will probably make sense to start moving in a direction that supports the xDS-TP config-sources. WDYT?

@sschepens

Copy link
Copy Markdown
Contributor Author

@adisuissa not sure exactly what you mean, I may be out of context. Do you mean the xdstp config_sources in Bootstrap? I see they are currently hidden and not implemented, not sure what the path here would be.

@sschepens
sschepens force-pushed the vhds-xdstp-collection branch 4 times, most recently from 6ea4da2 to b3a2962 Compare March 27, 2026 20:31
Comment thread api/envoy/config/route/v3/route.proto Resolved
Comment thread api/envoy/config/route/v3/route.proto Resolved
Signed-off-by: sschepens <[email protected]>
Signed-off-by: sschepens <[email protected]>
Signed-off-by: sschepens <[email protected]>
Signed-off-by: sschepens <[email protected]>
@sschepens
sschepens force-pushed the vhds-xdstp-collection branch from bdcc960 to 5db50ad Compare March 30, 2026 11:54
Comment thread api/envoy/config/route/v3/route.proto Resolved
@sschepens
sschepens force-pushed the vhds-xdstp-collection branch from f61c9ae to 422775d Compare April 6, 2026 20:30

@wbpcode wbpcode left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall now. Only one comments. Thanks for proceeding this works and your patience. 🙇

/wait

@tyxia

tyxia commented Sep 24, 2026

Copy link
Copy Markdown
Member

/wait

wait from PR author to address the comments from wbpcode

Signed-off-by: sschepens <[email protected]>
@sschepens
sschepens force-pushed the vhds-xdstp-collection branch from da20d88 to 4ee4e4f Compare October 16, 2026 15:08
@sschepens
sschepens force-pushed the vhds-xdstp-collection branch from 6777415 to 0d62c97 Compare October 16, 2026 20:26
@sschepens

Copy link
Copy Markdown
Contributor Author

/retest

@wbpcode wbpcode left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall. Thanks for all your patience and great works! Please merge main and check the tests again! And please add a change log for this change.

Comment thread test/integration/vhds.h Outdated
Comment on lines +465 to +468
sendDeltaDiscoveryResponse<envoy::config::route::v3::VirtualHost>(
Config::TestTypeUrl::get().VirtualHost, {buildVirtualHost()}, {}, "1", vhds_stream_.get());
EXPECT_TRUE(compareDeltaDiscoveryRequest(Config::TestTypeUrl::get().VirtualHost, {}, {},
vhds_stream_.get()));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary? Seems we call the sendDeltaVhdsResponse, then call the sendDeltaDiscoveryResponse?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, this was indeed a duplicate call, removed it.

@wbpcode

wbpcode commented Oct 25, 2026

Copy link
Copy Markdown
Member

/wait

Signed-off-by: sschepens <[email protected]>
@RyanTheOptimist

Copy link
Copy Markdown
Contributor

@wbpcode friendly maintainer-on-call ping

@wbpcode wbpcode left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the change log for this new feature. And also mark the API as [(xds.annotations.v3.field_status).work_in_progress = true] for now so we can revert it if you finally find cannot convince the control plane to support that.

And I guess these is another problem that there is no good way to resolve: the removal of the resource. The xdstp based resource removal based on the full xdstp's resource name, but the Envoy manage the resource based on the VirtuhalHost.name().

/wait

@sschepens

Copy link
Copy Markdown
Contributor Author

@wbpcode marked API as WIP and added a changelog.

Regarding VirtualHost.name vs Resource.name, this can already be a problem in current VHDS implementation right? Current on-demand VHDS implementation assumes Resource.name == VirtualHost.name but this isn't asserted. This is probably more problematin in XDSTP since we're making Resource.name and XDTP URI.
Solutions I can think of:
1- Enforce that Resource.name == VirtualHost.name, this is easy but might not be what people want since VirtualHost.name can be used for stats and having a full XDTP URI wouldn't be that nice.
2- Enforce Resource.name == "locator_prefix/" + VirtualHost.name so that we ensure that the XDSTP URI contains the actual VirtualHost.name. We can extract the VirtualHost name from the Resource name and use that information to perform deletions in RDS.
3- Modify RDS and VHDS to key by Resource.name instead of VirtualHost.name, this would require further changes but may be cleaner. Care should be taken when merging RDS and VHDS resources. Or maybe we want to disable using RDS+VHDS merging in this case, since a default VHDS collection is not like OnDemand VHDS, using a default VHDS collection should be the same as supplying VirtualHosts in RDS.

I'm more inclined to go with #3, with disabled RDS+VHDS merging when using default_virtual_host_resource_locator, seems cleaner.

@wbpcode

wbpcode commented Nov 18, 2026

Copy link
Copy Markdown
Member

For 3, it's hard to change except we could strictly ensure no one will be affected. We cannot accept to penalize usual VHDS for xdstp based VHDS.

But it's a problem we cannot discuss in the future. At same time, we will try to see could we add the explicit subscription to existing VHDS, to avoid dependency to the xdstp.

@wbpcode wbpcode left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.