Skip to content
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

[sotw][issue-540] Return full state when applicable for watches in linear cache #5

Merged

Conversation

valerian-roche
Copy link
Collaborator

Datadog fork PR matching envoyproxy#856

This PR is currently based on #4 , and include its diff too, but in a separate commit

Fixes envoyproxy#540

This PR is fixing issue envoyproxy#540: the xds protocol defines that for the resource types Listener and Cluster, when using sotw watches, the cache must return as part of the response all existing resources matching the requests if not wildcard.
Currently the control-plane will only return the modified resources on cache updates, and the protocol states that the client should interpret such a response as a deletion

In simple cache this distinction is not applicable as we currently always return all resources. While we may want to improve this behavior in the future (e.g. to avoid sending all clusters if only one was updated in delta, or to send a single route configuration in sotw on update), this is out of scope of this PR as this requires keeping more state

…ches subscribing to multiple resources

Properly return the request in sotw responses to allow proper handling in callbacks

Signed-off-by: Valerian Roche <[email protected]>
@valerian-roche valerian-roche changed the title Vr/resource returned [sotw][issue-540] Return full state when applicable for watches in linear cache Jan 10, 2024
pkg/cache/v3/resource.go Outdated Show resolved Hide resolved
Co-authored-by: Antoine Tollenaere <[email protected]>
Signed-off-by: Valerian Roche <[email protected]>
@valerian-roche valerian-roche merged commit 9068fc5 into DataDog:dd/sotw-fixes Jan 16, 2024
2 of 3 checks passed
@valerian-roche valerian-roche deleted the vr/resource-returned branch January 17, 2024 03:14
@valerian-roche valerian-roche restored the vr/resource-returned branch January 17, 2024 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants