-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
admin: complete /config_dump #3340
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Admin | ||
======== | ||
|
||
.. toctree:: | ||
:glob: | ||
:maxdepth: 2 | ||
|
||
../admin/v2alpha/config_dump.proto |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,13 +13,34 @@ | |
namespace Envoy { | ||
namespace Server { | ||
|
||
/** | ||
* Interface for an LDS API provider. | ||
*/ | ||
class LdsApi { | ||
public: | ||
virtual ~LdsApi() {} | ||
|
||
/** | ||
* @return std::string the last received version by the xDS API for LDS. | ||
*/ | ||
virtual std::string versionInfo() const PURE; | ||
}; | ||
|
||
typedef std::unique_ptr<LdsApi> LdsApiPtr; | ||
|
||
/** | ||
* Factory for creating listener components. | ||
*/ | ||
class ListenerComponentFactory { | ||
public: | ||
virtual ~ListenerComponentFactory() {} | ||
|
||
/** | ||
* @return an LDS API provider. | ||
* @param lds_config supplies the management server configuration. | ||
*/ | ||
virtual LdsApiPtr createLdsApi(const envoy::api::v2::core::ConfigSource& lds_config) PURE; | ||
|
||
/** | ||
* Creates a socket. | ||
* @param address supplies the socket's address. | ||
|
@@ -78,14 +99,24 @@ class ListenerManager { | |
* will be gracefully drained once the new listener is ready to take traffic (e.g. when RDS has | ||
* been initialized). | ||
* @param config supplies the configuration proto. | ||
* @param version_info supplies the xDS version of the listener. | ||
* @param modifiable supplies whether the added listener can be updated or removed. If the | ||
* listener is not modifiable, future calls to this function or removeListener() on behalf | ||
* of this listener will return false. | ||
* @return TRUE if a listener was added or FALSE if the listener was not updated because it is | ||
* a duplicate of the existing listener. This routine will throw an EnvoyException if | ||
* there is a fundamental error preventing the listener from being added or updated. | ||
*/ | ||
virtual bool addOrUpdateListener(const envoy::api::v2::Listener& config, bool modifiable) PURE; | ||
virtual bool addOrUpdateListener(const envoy::api::v2::Listener& config, | ||
const std::string& version_info, bool modifiable) PURE; | ||
|
||
/** | ||
* Instruct the listener manager to create an LDS API provider. This is a separate operation | ||
* during server initialization because the listener manager is created prior to several core | ||
* pieces of the server existing. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: @param |
||
* @param lds_config supplies the management server configuration. | ||
*/ | ||
virtual void createLdsApi(const envoy::api::v2::core::ConfigSource& lds_config) PURE; | ||
|
||
/** | ||
* @return std::vector<std::reference_wrapper<Network::ListenerConfig>> a list of the currently | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
Is EDS supported? This would be needed for a complete dump I think, right?
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.
It's not supported currently. Host information is available via the /clusters endpoint and how EDS is handled via the config tracker interface is not super simple. I would rather have someone do this in a follow up if this is important to them. I don't plan on doing this as part of this change. Happy to document that somewhere if you like.
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 you can add some TODOs and file an issue, that fine. Maybe also change the PR description to indicate this is mostly there but not EDS yet.
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.
Opened #3362