router: scoped rds (2d): integrate SRDS API into HttpConnectionManager#7068
router: scoped rds (2d): integrate SRDS API into HttpConnectionManager#7068htuch merged 44 commits intoenvoyproxy:masterfrom
Conversation
This commit introduces: - Support for scoped routing configuration parsing. - Inline and dynamic config providers using the ConfigProvider framework. - Unit and integration testing scaffolding. This is the second step in the PR chain for envoyproxy#4704. Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
…-dynamic Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
- Top level SRDS resource is now called a 'ScopedRouteConfiguration'. - SRDS now operates like CDS where the full set of resources received via the DS builds the complete configuration state. - Modified the ConfigProvider framework to support delta APIs such as SRDS and CDS - Scoped RDS unit test mostly passing, integration tests have not yet been migrated to new API Signed-off-by: Andres Guedez <aguedez@google.com>
Also, cleanup. Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
…-dynamic Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
…-dynamic Signed-off-by: Andres Guedez <aguedez@google.com>
- Refactor the framework to create a cleaner, more cohesive set of abstractions based on the ConfigProvider::ApiType of the DS API. - Rename base classes for consistency and clarity. Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
…scoped-rds-integration Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
…ation Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
…ation Signed-off-by: Andres Guedez <aguedez@google.com>
…ation Signed-off-by: Andres Guedez <aguedez@google.com>
|
Please merge master to pick up #7090 |
…ation Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
|
/retest |
|
🔨 rebuilding |
|
Is there any way to retest just the envoy-macos CI run? It appears to have flaked but /retest did not kick off a rerun. |
|
/azp run |
|
Command 'run
@AndresGuedez' is not supported by Azure Pipelines. Supported commands
See additional documentation. |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
htuch
left a comment
There was a problem hiding this comment.
Generally looks good, a few comments on some of the proto munging.
source/common/router/scoped_rds.cc
Outdated
| config.scoped_routes().scope_key_builder())); | ||
|
|
||
| case envoy::config::filter::network::http_connection_manager::v2::ScopedRoutes:: | ||
| CONFIG_SPECIFIER_NOT_SET: |
There was a problem hiding this comment.
Should we have a proto constraint to ensure this never happens?
There was a problem hiding this comment.
We do have one, see http_connection_manager.proto.
I've removed handling of the condition to allow it to fall through to the default: to avoid ambiguity.
source/common/router/scoped_rds.cc
Outdated
| Protobuf::Message* clone = scoped_route_config.New(); | ||
| clone->MergeFrom(scoped_route_config); | ||
| return std::unique_ptr<const Protobuf::Message>(clone); | ||
| }); |
There was a problem hiding this comment.
Should there just be some util to convert a RepeatedPtrField to these const vectors in source/common/protobuf? Seems generic enough
There was a problem hiding this comment.
I've added the utility function.
Signed-off-by: Andres Guedez <aguedez@google.com>
source/common/router/scoped_rds.cc
Outdated
| config.scoped_routes().rds_config_source(), | ||
| config.scoped_routes().scope_key_builder())); | ||
| } | ||
|
|
| )EOF"; | ||
| envoy::config::filter::network::http_connection_manager::v2::ScopedRoutes::ScopeKeyBuilder | ||
| scope_key_builder; | ||
| MessageUtil::loadFromYaml(scope_key_builder_config_yaml, scope_key_builder); |
There was a problem hiding this comment.
Can you merge master to pick up changes? This will need to change to TestUtil::loadFromYaml..
…ation Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
|
Thanks for the reviews throughout this whole PR chain! |
Integrate the Scoped Route Discovery Service (SRDS) API into the HttpConnectionManager.
NOTES:
Risk Level: Low (API is not yet fully implemented and should not be enabled)
Testing: Integration tests added.
Docs Changes: N/A