Skip to content

Commit aaf2cd9

Browse files
committed
chore: bump ReferenceGrant from v1beta1 to v1
1 parent e82a27b commit aaf2cd9

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

pkg/provider/k8sreferencegrantroutescountprovider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const (
2222
func NewK8sReferenceGrantCountProvider(name string, m metadata.Interface, rm meta.RESTMapper) (Provider, error) {
2323
gvr := schema.GroupVersionResource{
2424
Group: "gateway.networking.k8s.io",
25-
Version: "v1beta1",
25+
Version: "v1",
2626
Resource: "referencegrants",
2727
}
2828
return NewK8sObjectCountProviderWithRESTMapper(name, ReferenceGrantCountKind, m, gvr, rm)

pkg/telemetry/workflowsk8s_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
ctrlclient_fake "sigs.k8s.io/controller-runtime/pkg/client/fake"
2323
gatewayv1 "sigs.k8s.io/gateway-api/apis/v1"
2424
gatewayv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
25-
gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
2625

2726
"github.com/kong/kubernetes-telemetry/pkg/provider"
2827
"github.com/kong/kubernetes-telemetry/pkg/types"
@@ -168,7 +167,7 @@ func TestWorkflowClusterState(t *testing.T) {
168167
Name: "httproute-1",
169168
},
170169
},
171-
&gatewayv1beta1.ReferenceGrant{
170+
&gatewayv1.ReferenceGrant{
172171
ObjectMeta: metav1.ObjectMeta{
173172
Namespace: "kong",
174173
Name: "referencegrant-1",
@@ -280,7 +279,7 @@ func TestWorkflowClusterState(t *testing.T) {
280279
as(gatewayv1.GroupVersion, "Gateway", "gateways")
281280
as(gatewayv1.GroupVersion, "HTTPRoute", "httproutes")
282281
as(gatewayv1.GroupVersion, "GRPCRoute", "grpcroutes")
283-
as(gatewayv1beta1.GroupVersion, "ReferenceGrant", "referencegrants")
282+
as(gatewayv1.GroupVersion, "ReferenceGrant", "referencegrants")
284283
as(gatewayv1alpha2.GroupVersion, "TCPRoute", "tcproutes")
285284
as(gatewayv1alpha2.GroupVersion, "UDPRoute", "udproutes")
286285
as(gatewayv1alpha2.GroupVersion, "TLSRoute", "tlsroutes")
@@ -313,7 +312,7 @@ func TestWorkflowClusterState(t *testing.T) {
313312
provider.HTTPRouteCountKey: 1,
314313
provider.GatewayClassCountKey: 1,
315314
provider.GatewayCountKey: 0, // This should be equal to 1 but see above for comment explaining the issue.
316-
// gateway.networking.k8s.io v1beta1
315+
// gateway.networking.k8s.io v1
317316
provider.ReferenceGrantCountKey: 1,
318317
// gateway.networking.k8s.io v1alpha2
319318
provider.TCPRouteCountKey: 1,

0 commit comments

Comments
 (0)