xds: Add a KeyValueStore-backed xDS delegate extension to contrib#77
Draft
abeyad wants to merge 1 commit intoxds_persistent_factoryfrom
Draft
xds: Add a KeyValueStore-backed xDS delegate extension to contrib#77abeyad wants to merge 1 commit intoxds_persistent_factoryfrom
abeyad wants to merge 1 commit intoxds_persistent_factoryfrom
Conversation
An xDS delegate extension point was added in envoyproxy#22473 to enable custom behavior upon receiving and loading xDS resources. This change creates an implementation of the XdsResourcesDelegate interface that is backed by a KeyValueStore. The intended use case is to enable persisting xDS resources and loading them on startup in Envoy Mobile, in the event that the xDS control plane is unreachable. Signed-off-by: Ali Beyad <abeyad@google.com>
alyssawilk
reviewed
Aug 8, 2022
alyssawilk
left a comment
There was a problem hiding this comment.
very cool! only high level comments (and looking forward to your TODO for comments)
| // distinct key namespace. | ||
| constexpr char KEY_PREFIX[] = "XDS_CONFIG"; | ||
| // The delimiter between parts of the key. | ||
| constexpr char DELIMITER[] = "*+"; |
There was a problem hiding this comment.
definitely worth checking if there's constraints on prefs key naming where + or URL characters won't work (if we have to base64 encode or some such)
| const std::string filename = TestEnvironment::temporaryPath("dns_cache.txt"); | ||
| ::unlink(filename.c_str()); | ||
|
|
||
| return fmt::format(R"EOF( |
There was a problem hiding this comment.
in general we want to addconfigModifiers or use prior const config
|
|
||
| std::string bootstrapConfig() { | ||
| const std::string filename = TestEnvironment::temporaryPath("dns_cache.txt"); | ||
| ::unlink(filename.c_str()); |
There was a problem hiding this comment.
yaaas. Came here to make this comment, and you already did it, haha
| static constexpr char RTDS_CLUSTER_NAME[] = "rtds_cluster"; | ||
| static constexpr char CLIENT_CERT_NAME[] = "client_cert"; | ||
|
|
||
| std::string bootstrapConfig() { |
There was a problem hiding this comment.
I do think this is worth unit tests as well, as they're easier for testing updates, eviction etc.
Owner
Author
|
/cc @goaway FYI, still a WIP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
An xDS delegate extension point was added in
envoyproxy#22473 to enable custom behavior
upon receiving and loading xDS resources. This change creates an
implementation of the XdsResourcesDelegate interface that is backed by a
KeyValueStore.
The intended use case is to enable persisting xDS resources and loading
them on startup in Envoy Mobile, in the event that the xDS control plane
is unreachable.
Signed-off-by: Ali Beyad abeyad@google.com
Commit Message:
Additional Description:
Risk Level:
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:]