From ba9217df8d253dd2a6678d940a088b13a08e4bd9 Mon Sep 17 00:00:00 2001 From: Kishor Joshi Date: Wed, 22 Feb 2023 14:21:26 -0800 Subject: [PATCH 1/2] update to discovery.k8s.io/v1 --- controllers/elbv2/eventhandlers/endpointslices.go | 2 +- controllers/elbv2/eventhandlers/endpointslices_test.go | 2 +- controllers/elbv2/targetgroupbinding_controller.go | 2 +- pkg/backend/endpoint_resolver.go | 2 +- pkg/backend/endpoint_resolver_test.go | 2 +- pkg/backend/endpoint_types.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/controllers/elbv2/eventhandlers/endpointslices.go b/controllers/elbv2/eventhandlers/endpointslices.go index ba2467c86..b11a65d82 100644 --- a/controllers/elbv2/eventhandlers/endpointslices.go +++ b/controllers/elbv2/eventhandlers/endpointslices.go @@ -5,7 +5,7 @@ import ( "github.com/go-logr/logr" "github.com/pkg/errors" - discv1 "k8s.io/api/discovery/v1beta1" + discv1 "k8s.io/api/discovery/v1" "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/util/workqueue" diff --git a/controllers/elbv2/eventhandlers/endpointslices_test.go b/controllers/elbv2/eventhandlers/endpointslices_test.go index 855ed54ec..5a34dfd6b 100644 --- a/controllers/elbv2/eventhandlers/endpointslices_test.go +++ b/controllers/elbv2/eventhandlers/endpointslices_test.go @@ -7,7 +7,7 @@ import ( "github.com/golang/mock/gomock" "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/assert" - discv1 "k8s.io/api/discovery/v1beta1" + discv1 "k8s.io/api/discovery/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/util/workqueue" diff --git a/controllers/elbv2/targetgroupbinding_controller.go b/controllers/elbv2/targetgroupbinding_controller.go index d36576602..c263bbb54 100644 --- a/controllers/elbv2/targetgroupbinding_controller.go +++ b/controllers/elbv2/targetgroupbinding_controller.go @@ -24,7 +24,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" - discv1 "k8s.io/api/discovery/v1beta1" + discv1 "k8s.io/api/discovery/v1" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" "sigs.k8s.io/aws-load-balancer-controller/controllers/elbv2/eventhandlers" diff --git a/pkg/backend/endpoint_resolver.go b/pkg/backend/endpoint_resolver.go index 5fbe1f01c..7212938bb 100644 --- a/pkg/backend/endpoint_resolver.go +++ b/pkg/backend/endpoint_resolver.go @@ -8,7 +8,7 @@ import ( "github.com/go-logr/logr" "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" - discovery "k8s.io/api/discovery/v1beta1" + discovery "k8s.io/api/discovery/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" diff --git a/pkg/backend/endpoint_resolver_test.go b/pkg/backend/endpoint_resolver_test.go index 2333e53d9..e637dc929 100644 --- a/pkg/backend/endpoint_resolver_test.go +++ b/pkg/backend/endpoint_resolver_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" - discovery "k8s.io/api/discovery/v1beta1" + discovery "k8s.io/api/discovery/v1" ) func Test_defaultEndpointResolver_ResolvePodEndpoints(t *testing.T) { diff --git a/pkg/backend/endpoint_types.go b/pkg/backend/endpoint_types.go index b006bacb9..76d017bd5 100644 --- a/pkg/backend/endpoint_types.go +++ b/pkg/backend/endpoint_types.go @@ -2,7 +2,7 @@ package backend import ( corev1 "k8s.io/api/core/v1" - discv1 "k8s.io/api/discovery/v1beta1" + discv1 "k8s.io/api/discovery/v1" "k8s.io/apimachinery/pkg/labels" "sigs.k8s.io/aws-load-balancer-controller/pkg/k8s" ) From 7cc13ca140b0eb0e3d35f654d2fdef00c0df2bc6 Mon Sep 17 00:00:00 2001 From: Kishor Joshi Date: Wed, 22 Feb 2023 16:17:48 -0800 Subject: [PATCH 2/2] fix upstream prow tests for 2.4 branch set ASSUME_NO_MOVING_GC_UNSAFE_RISK_IT_WITH=go1.20, since 2.4 branch uses go 1.19 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5f376c2c7..283a1d418 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ all: controller # Run tests test: generate fmt vet manifests helm-lint - go test -race ./pkg/... ./webhooks/... -coverprofile cover.out + ASSUME_NO_MOVING_GC_UNSAFE_RISK_IT_WITH=go1.20 go test -race ./pkg/... ./webhooks/... -coverprofile cover.out # Build controller binary controller: generate fmt vet