-
Notifications
You must be signed in to change notification settings - Fork 4k
xds: add RlsClusterSpecifierPlugin for RLS-in-xDS #8612
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
Conversation
sergiitk
left a comment
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.
LGTM, some notes.
xds/src/test/java/io/grpc/xds/RlsClusterSpecifierPluginTest.java
Outdated
Show resolved
Hide resolved
sergiitk
left a comment
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.
Thank you for addressing my nits :)
|
Why is this exposing RlsProtoData to xds? That is not what the design called for. The design seems to imply that the proto would be converted to json, but certainly it is json being passed to the existing LB policy parsing logic. Is that not feasible? |
It is feasible to use json if the plugin TypedExtension is encoded with TypedStruct (typeUrl = "type.googleapis.com/envoy.config.route.v3.FilterConfig") instead of RlsProtoData, and the plugin implementation should avoid using RlsProtoData proto. But this should be called out in the design. cc @dfawley |
That would not be the correct type. It would be It is never encoded with RlsProtoData. That's our internal representation. Even if it is encoded as a proto, we can convert |
Sorry, I copy & paste in mistake. It should be (typUrl="type.googleapis.com/udpa.type.v1.TypedStruct") in the top level of TypedExtension. Then inside the TypedStruct, the inner level typeUrl is "grpc.lookup.v1.RlsClusterSpecifier" |
The design does note that the RLS cluster specifier plugin should emit, as part of the config, |
- Partially revert the change of RlsProtoData.java in #8612 by removing `public` accessor - Have grpc-xds no longer strongly depend on grpc-rls. The application will need grpc-rls as runtime dependencies if they need route lookup feature in xds. - Parse RouteLookupServiceClusterSpecifierPlugin config to the Json/Map representation of `io.grpc.lookup.v1.RouteLookupClusterSpecifier` instead of `io.grpc.rls.RlsProtoData.RouteLookupConfig`
Add RlsClusterSpecifierPlugin as per the design doc
The structure of
ClusterSpecifierPluginis very similar toio.grpc.xds.Filter.The following changes to the existing code are made:
ConfigOrErrorclass out ofFilterclass to be shared withClusterSpecifierPluginio.grpc.rls.RlsProtoDatapublic to be accessible byio.grpc.xdsio.grpc.rls.RlsProtoData.RouteLookupConfigas null to support both json and proto config without defaultTarget field specified.