generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 621
Basic GRPCRoute Conformance Tests #2745
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
Merged
k8s-ci-robot
merged 21 commits into
kubernetes-sigs:main
from
gnossen:grpcroute_conformance
Mar 5, 2024
Merged
Changes from 8 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
25f6db6
Build gRPC conformance server image
gnossen cb33bd5
Add initial grpc conformance test server unit test
gnossen c9e5fbe
Add test for header echoing
gnossen 60a326d
Parameterize Echo and EchoTwo
gnossen d358200
Go fmt
gnossen 3dce0e8
First passing conformance test
gnossen 589c4c8
Re-add tests
gnossen ad2a032
Add cross-platform codegen
gnossen 8d0af69
Merge gRPC echo server into echo-basic binary and docker image
gnossen 929c3fb
Review comments
gnossen a76eb51
Merge remote-tracking branch 'origin/main' into grpcroute_conformance
gnossen cdc9c2e
Fix file inclusion
gnossen 605d028
Skip boilerplate check for protobuf generated codee
gnossen 2c91fb5
Please the linter
gnossen 67fa5ca
Remove dangling grpc-echo unit test invocation
gnossen 46800f1
Add debug prints
gnossen 60f7779
Ensure GOPATH/bin is on the PATH
gnossen 433c747
Remove debug prints
gnossen ab9e746
Account for https://github.com/kubernetes-sigs/gateway-api/pull/2829
gnossen 1d69a46
Merge remote-tracking branch 'origin/main' into grpcroute_conformance
gnossen 91086d6
golint
gnossen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| grpc-echo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| module sigs.k8s.io/gateway-api/conformance/grpc-echo | ||
|
|
||
| go 1.21 | ||
|
|
||
| require ( | ||
| google.golang.org/grpc v1.53.0 | ||
| google.golang.org/protobuf v1.28.1 | ||
| ) | ||
|
|
||
| require ( | ||
| github.com/golang/protobuf v1.5.2 // indirect | ||
| golang.org/x/net v0.5.0 // indirect | ||
| golang.org/x/sys v0.4.0 // indirect | ||
| golang.org/x/text v0.6.0 // indirect | ||
| google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= | ||
| github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= | ||
| github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= | ||
| github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | ||
| github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= | ||
| github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= | ||
| golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= | ||
| golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= | ||
| golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= | ||
| golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
| golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= | ||
| golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= | ||
| golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | ||
| google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= | ||
| google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= | ||
| google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= | ||
| google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= | ||
| google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= | ||
| google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= | ||
| google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= | ||
| google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| // Copyright 2024 The Kubernetes Authors. | ||
| // | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| syntax = "proto3"; | ||
|
|
||
| option go_package = "sigs.k8s.io/gateway-api/conformance/grpc-echo/grpcechoserver"; | ||
|
|
||
| package gateway_api_conformance.grpc_echo.grpcecho; | ||
|
|
||
gnossen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| message Header { | ||
| string key = 1; | ||
| string value = 2; | ||
| } | ||
|
|
||
| message Context { | ||
| // The Kubernetes namespace in which this server is running. Populated by the | ||
| // NAMESPACE environment variable. | ||
| string namespace = 1; | ||
|
|
||
| // The name of the ingress controller under test. Populated by the INGRESS_NAME | ||
| // environment variable. | ||
| string ingress = 2; | ||
|
|
||
| // The name service cannot be used here since it is a reserved word. Populated by the | ||
| // SERVICE_NAME environment variable. | ||
| string service_name = 3; | ||
gnossen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| // The name of the pod in which this server is running. Populated by the POD_NAME | ||
| // environment variable. | ||
| string pod = 4; | ||
| } | ||
|
|
||
| message TLSAssertions { | ||
| // The TLS version used by the connection, e.g. "TLSv1.3" | ||
| string version = 1; | ||
|
|
||
| // The negotatiated protocol. | ||
| string negotiated_protocol = 2; | ||
|
|
||
| // The server name indication extension sent by the client. | ||
| string server_name = 3; | ||
|
|
||
| // The cipher suite negotatiated for the connection, e.g. "TLS_EDCHE_ECDSA_WITH_AES_128_GCM_SHA256" | ||
| string cipher_suite = 4; | ||
|
|
||
| // The parsed certificates sent by the peer, in the order in which they were sent. | ||
| repeated string peer_certificates = 5; | ||
| } | ||
|
|
||
| message Assertions { | ||
| // The fully qualified method of the current RPC, e.g. | ||
| // "/gateway_api_conformance.grpc_echo.grpcecho.GrpcEcho/Echo" | ||
| string fully_qualified_method = 1; | ||
|
|
||
| // The headers present in the request. | ||
| repeated Header headers = 2; | ||
|
|
||
| // The :authority pseudo-header of the request. | ||
| string authority = 3; | ||
|
|
||
| // Information associated with the conformance server deployment. | ||
| Context context = 4; | ||
|
|
||
| // Information related to the TLS connection between the client and the server. | ||
| TLSAssertions tls_assertions = 5; | ||
| } | ||
|
|
||
| message EchoRequest {} | ||
|
|
||
| message EchoResponse { | ||
| Assertions assertions = 1; | ||
| EchoRequest request = 2; | ||
| } | ||
|
|
||
| service GrpcEcho { | ||
| rpc Echo(EchoRequest) returns (EchoResponse) {} | ||
|
|
||
| // Behaves identically to Echo, but lives at a different method to | ||
| // emulate the service having more than one method. | ||
| rpc EchoTwo(EchoRequest) returns (EchoResponse) {} | ||
|
|
||
| // An intentionally unimplemented method. | ||
| rpc EchoThree(EchoRequest) returns (EchoResponse) {} | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.
Also apparently we should have spaces instead of tabs here.
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 this TODO should be gone by the time this is merged. How can I know before I've submitted this PR what tag CI will result in with the image build? Or will I have to split this into two PRs: docker image additions and test implementations?