-
Notifications
You must be signed in to change notification settings - Fork 689
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
Gateway API: add GRPCRoute support #5114
Conversation
Add kind and cache support for GRPCRoute Updates #4820 Signed-off-by: Fang Peng <[email protected]>
add registration controller and reconcile support for GRPCRoute; update handler and serve to call the registration. Updates #4820 Signed-off-by: Yu Ying <[email protected]>
Implement gatewayapi_processor.go for building GRPCRoute dag. Updates #4820 Signed-off-by: Fang Peng <[email protected]>
* GRPCRotue: add ut test cases for 1.TestGetListenersForRotueParentRef 2.TestDAGInsertGatewayAPI Updates #4820 Signed-off-by: Yu Ying <[email protected]> * GRPCRoute: set default protocol type for mirrored service Updates #4820 Signed-off-by: Yu Ying <[email protected]> * GRPCRoute: remove unnecessary type conversion and comment Updates #4820 Signed-off-by: Yu Ying <[email protected]> --------- Signed-off-by: Yu Ying <[email protected]>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #5114 +/- ##
==========================================
+ Coverage 77.97% 78.01% +0.03%
==========================================
Files 137 138 +1
Lines 17237 17604 +367
==========================================
+ Hits 13441 13733 +292
- Misses 3536 3600 +64
- Partials 260 271 +11
|
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.
Overall looking good, had a few small comment
Updates #4820 Signed-off-by: Fang Peng <[email protected]>
FYI, with this path match fix in place, I was able to get gRPC traffic routing! I used the yages example service from https://projectcontour.io/docs/v1.24.1/guides/grpc/ as the backend. Here's the GRPCRoute I used (note it includes a match for the gRPC reflection service, which is needed by grpcurl): apiVersion: gateway.networking.k8s.io/v1alpha2
kind: GRPCRoute
metadata:
name: yages
spec:
parentRefs:
- namespace: projectcontour
name: contour
hostnames:
- my-grpc-service.foo.com
rules:
- matches:
- method:
service: yages.Echo
method: Ping
- method:
service: grpc.reflection.v1alpha.ServerReflection
method: ServerReflectionInfo
backendRefs:
- name: grpc-echo
port: 9000 My method for getting this up and running was roughly:
|
This is great news! I will make the suggested path prefix fix. |
- need to add a leading slash in the path - need to add a prefix match if method match is not specified. - internal-dag: Add default prefix match with 0 matches Updates #4820 Signed-off-by: Fang Peng <[email protected]>
@fangfpeng @vmw-yingy this is looking pretty good! There are still a few (minor) outstanding review comments above, and this PR will need a changelog file as well. |
Also made some changes based on review comment on gatewayapi_processor.go. Signed-off-by: Fang Peng <[email protected]>
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! Will leave for @sunjayBhatia to take another look at as well. Thanks @fangfpeng and @vmw-yingy for all your work on this.
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 great work!
I'm thinking we should add some e2e tests while upstream Gateway API conformance is missing them, but that can definitely be done in a follow-up!
Adds support for Gateway API's GRPCRoute, an experimental v1alpha2 resource as of Gateway API v0.6. Core conformance features are currently implemented. Closes projectcontour#4820. Co-authored-by: Yu Ying <[email protected]> Signed-off-by: Fang Peng <[email protected]> Signed-off-by: Yu Ying <[email protected]>
Closes #4820.