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
Add support for self config source #5459
Conversation
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.
Modified so that subscribed ResourceNode#configSource is always non-null.
Let's remove Nullable
in the ListenerResourceNode
constructor.
xds/src/main/java/com/linecorp/armeria/xds/AbstractResourceNode.java
Outdated
Show resolved
Hide resolved
xds/src/main/java/com/linecorp/armeria/xds/ClusterResourceNode.java
Outdated
Show resolved
Hide resolved
xds/src/main/java/com/linecorp/armeria/xds/ConfigSourceMapper.java
Outdated
Show resolved
Hide resolved
xds/src/main/java/com/linecorp/armeria/xds/ConfigSourceMapper.java
Outdated
Show resolved
Hide resolved
xds/src/main/java/com/linecorp/armeria/xds/ConfigSourceMapper.java
Outdated
Show resolved
Hide resolved
Coincidentally, due to the recent changes now
|
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.
Looks very useful. Thanks! 👍 👍 👍
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5459 +/- ##
=========================================
Coverage 74.09% 74.10%
- Complexity 20968 20993 +25
=========================================
Files 1817 1818 +1
Lines 77187 77273 +86
Branches 9854 9867 +13
=========================================
+ Hits 57194 57262 +68
- Misses 15323 15326 +3
- Partials 4670 4685 +15 ☔ View full report in Codecov by Sentry. |
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.
�Though it is not a standard feature, it could be useful. 🙇♂️🙇♂️
xds/src/main/java/com/linecorp/armeria/xds/ClusterResourceNode.java
Outdated
Show resolved
Hide resolved
Still LGTM. |
Motivation:
This pull request adds support for SELF config source types. This feature allows the control plane to delegate the decision of which protocol to use to the client.
Reference: https://github.com/envoyproxy/envoy/blob/bd18d0fa7790a7e5fe1a95f6ae271ca02614e36c/api/envoy/config/core/v3/config_source.proto#L239
Note that this implementation may not have been completed from envoy side, so we should use this option with caution.
ref: envoyproxy/envoy#13951
Modifications:
ResourceNode
andConfigSource
has changed. This can be a problem because the configSource specified inResourceNode#ConfigSource
can be different from the actualConfigSource
used for subscribing. Modified so thatConfigSource
is computed before creating aResourceNode
.BootstrapApiConfigs
toConfigSourceMapper
since it better represents the functionality of the class.parentConfigSource
to the logic of computing a new configSource.ResourceNode#configSource
is always non-null. The only case where this isnull
is for static clusters (bootstrap clusters)Result: