-
Notifications
You must be signed in to change notification settings - Fork 52
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 gRPC route controller #341
Conversation
# Conflicts: # test/pkg/test/framework.go
…g struct value instead of reference in httproute_controller, Using type switch with default error instead of if statement without error, Joined two logs into one
# Conflicts: # pkg/deploy/lattice/rule_manager.go # pkg/gateway/model_build_rule.go # pkg/gateway/model_build_rule_test.go # pkg/model/lattice/rule.go
Pull Request Test Coverage Report for Build 5930851420
💛 - Coveralls |
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.
I think it's worth to invest time on reusing existing http controller, there are similarities. Also amount of copy-pasted code good indicator for reuse.
Addressed all comments. E2E tests still pass:
And manual steps from description still function as expected. |
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 much better! I'm a bit worried that we have quite a bit of logic in controller and not covered by unit tests at all. We should have a follow up on this, after gRPC wrap up:
- move everything into pkg, let controller be simple lunching pad
- start adding unit tests
When I run the it meet the:
Is that normal? |
I think created TG ProtocolVersion should be
|
apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: HTTPRoute | ||
apiVersion: gateway.networking.k8s.io/v1alpha2 | ||
kind: GRPCRoute | ||
metadata: | ||
name: grpc |
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.
Could you change this name to some thing like my-grpc-route?
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.
Why?
Yes, this is part of the actions required for a future PR mentioned in the description. This PR is purely meant to set up the controller and matches, the next PR will be to enable gRPC traffic. There are multiple places that need changes, with the target group model builder being one of them. |
Yes, this was an issue before my PR, and wasn't actually a necessary step. We only change the v0.6.1 CRD and only need to apply that one. I removed that command from the PR description. The issue with applying the alpha CRD is out of scope here |
# Conflicts: # examples/grpc-route.yaml
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, looking forward to your next few GRPCRoute PRs
What type of PR is this?
feature
Which issue does this PR fix:
#25 (partial)
What does this PR do / Why do we need it:
-v 6
flag when running in developer modeIf an issue # is not available please add repro steps and logs from aws-gateway-controller showing the issue:
kubectl apply -f examples/my-hotel-gateway.yaml
kubectl apply -f examples/grpc-server.yaml
kubectl apply -f examples/grpc-route.yaml
Should create VPC Lattice Service routing to GRPC server. If a service and method is specified in
grpc-route.yaml
, the rule using a PathMatchExact value of/<service>/<method>
is expected. If a service is provided, but no method is provided, a PatchMatchPrefix value of/<service>/
is expected. If neither a service, nor a method is provided, a PathMatchPrefix value of/
is expected. If no service is provided, but a method is provided, this should fail to reconcile since Lattice doesn't support Regex or Suffix matches.Additionally, deletion of these resources should succeed, with both Lattice and K8s resources being deleted.
Testing done on this change:
Ran e2e tests using latest changes:
And ran the manual steps mentioned above.
Automation added to e2e:
No, this is to be done separately.
Will this PR introduce any new dependencies?:
No.
Will this break upgrades or downgrades. Has updating a running cluster been tested?:
The new CRD must be deployed to the cluster. The following commands will do so:
Does this PR introduce any user-facing change?:
Yes, though the feature is not complete yet.
Remaining work in followup PR:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.