Skip to content
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

register for v1beta1 gateway api #2007

Merged
merged 6 commits into from
Oct 19, 2023
Merged

register for v1beta1 gateway api #2007

merged 6 commits into from
Oct 19, 2023

Conversation

arkodg
Copy link
Contributor

@arkodg arkodg commented Oct 19, 2023

  • ReferenceGrant is still on v1beta1

Fixes: #2005

* `ReferenceGrant` is still on v1beta1

Fixes: envoyproxy#2005

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
@arkodg arkodg requested a review from a team as a code owner October 19, 2023 02:31
@arkodg arkodg marked this pull request as draft October 19, 2023 02:31
@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

Merging #2007 (23cc55f) into main (d3110e3) will decrease coverage by 0.11%.
The diff coverage is 27.27%.

@@            Coverage Diff             @@
##             main    #2007      +/-   ##
==========================================
- Coverage   65.66%   65.56%   -0.11%     
==========================================
  Files          92       92              
  Lines       13509    13509              
==========================================
- Hits         8871     8857      -14     
- Misses       4095     4106      +11     
- Partials      543      546       +3     
Files Coverage Δ
internal/gatewayapi/validate.go 89.30% <100.00%> (ø)
internal/gatewayapi/resource.go 67.27% <0.00%> (ø)
internal/gatewayapi/zz_generated.deepcopy.go 0.00% <0.00%> (ø)
internal/provider/kubernetes/controller.go 54.23% <28.57%> (-1.23%) ⬇️

... and 1 file with indirect coverage changes

@arkodg
Copy link
Contributor Author

arkodg commented Oct 19, 2023

seeing this error in the logs, not sure what's the issue

2023-10-19T02:39:40.5065902Z === NAME  TestExperimentalConformance/HTTPRouteReferenceGrant
2023-10-19T02:39:40.5066737Z     httproute-reference-grant.go:72: 
2023-10-19T02:39:40.5068869Z         	Error Trace:	/home/runner/go/pkg/mod/sigs.k8s.io/gateway-api@v1.0.0-rc1/conformance/tests/httproute-reference-grant.go:72
2023-10-19T02:39:40.5071652Z         	            				/home/runner/go/pkg/mod/sigs.k8s.io/gateway-api@v1.0.0-rc1/conformance/utils/suite/suite.go:254
2023-10-19T02:39:40.5074197Z         	            				/home/runner/go/pkg/mod/sigs.k8s.io/gateway-api@v1.0.0-rc1/conformance/utils/suite/experimental_suite.go:212
2023-10-19T02:39:40.5075488Z         	Error:      	Received unexpected error:
2023-10-19T02:39:40.5077172Z         	            	no kind is registered for the type v1beta1.ReferenceGrant in scheme "pkg/runtime/scheme.go:100"
2023-10-19T02:39:40.5078848Z         	Test:       	TestExperimentalConformance/HTTPRouteReferenceGrant

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
@Xunzhuo
Copy link
Member

Xunzhuo commented Oct 19, 2023

You should add:

diff --git a/test/conformance/conformance_test.go b/test/conformance/conformance_test.go
index b0b49c4f..b655e552 100644
--- a/test/conformance/conformance_test.go
+++ b/test/conformance/conformance_test.go
@@ -16,8 +16,9 @@ import (
        "k8s.io/client-go/kubernetes"
        "sigs.k8s.io/controller-runtime/pkg/client"
        "sigs.k8s.io/controller-runtime/pkg/client/config"
-       "sigs.k8s.io/gateway-api/apis/v1"
+       v1 "sigs.k8s.io/gateway-api/apis/v1"
        "sigs.k8s.io/gateway-api/apis/v1alpha2"
+       "sigs.k8s.io/gateway-api/apis/v1beta1"
        "sigs.k8s.io/gateway-api/conformance/tests"
        "sigs.k8s.io/gateway-api/conformance/utils/flags"
        "sigs.k8s.io/gateway-api/conformance/utils/suite"
@@ -37,6 +38,7 @@ func TestGatewayAPIConformance(t *testing.T) {
 
        require.NoError(t, v1alpha2.AddToScheme(client.Scheme()))
        require.NoError(t, v1.AddToScheme(client.Scheme()))
+       require.NoError(t, v1beta1.AddToScheme(client.Scheme()))
 
        cSuite := suite.New(suite.Options{
                Client:               client,
diff --git a/test/conformance/experimental_conformance_test.go b/test/conformance/experimental_conformance_test.go
index 814bd88a..b6dac79d 100644
--- a/test/conformance/experimental_conformance_test.go
+++ b/test/conformance/experimental_conformance_test.go
@@ -20,8 +20,9 @@ import (
        "sigs.k8s.io/controller-runtime/pkg/client/config"
        "sigs.k8s.io/yaml"
 
-       "sigs.k8s.io/gateway-api/apis/v1"
+       v1 "sigs.k8s.io/gateway-api/apis/v1"
        "sigs.k8s.io/gateway-api/apis/v1alpha2"
+       "sigs.k8s.io/gateway-api/apis/v1beta1"
        confv1a1 "sigs.k8s.io/gateway-api/conformance/apis/v1alpha1"
        "sigs.k8s.io/gateway-api/conformance/tests"
        "sigs.k8s.io/gateway-api/conformance/utils/flags"
@@ -55,6 +56,8 @@ func TestExperimentalConformance(t *testing.T) {
        assert.NoError(t, err)
        err = v1.AddToScheme(mgrClient.Scheme())
        assert.NoError(t, err)
+       err = v1beta1.AddToScheme(mgrClient.Scheme())
+       assert.NoError(t, err)
 
        // experimental conformance flags
        conformanceProfiles = sets.New(

@arkodg
Copy link
Contributor Author

arkodg commented Oct 19, 2023

thanks @Xunzhuo !

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
@arkodg arkodg marked this pull request as ready for review October 19, 2023 05:21
@Xunzhuo Xunzhuo merged commit 98213e4 into envoyproxy:main Oct 19, 2023
9 checks passed
@arkodg arkodg deleted the v1b1 branch October 19, 2023 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable HTTPRouteReferenceGrant test
3 participants