From 6ecdebec13aa47f00ed3b1bfc926127be333075b Mon Sep 17 00:00:00 2001 From: Jay Deokar Date: Fri, 26 Jul 2024 10:01:28 -0700 Subject: [PATCH] Handle error while registering/deregistering target during load balancer update --- .ko.yaml | 2 +- Dockerfile | 4 ++-- cloudbuild.yaml | 2 +- go.mod | 2 +- pkg/providers/v1/aws.go | 3 ++- tests/e2e/go.mod | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.ko.yaml b/.ko.yaml index e9e692beb0..2585f7a36c 100644 --- a/.ko.yaml +++ b/.ko.yaml @@ -1 +1 @@ -defaultBaseImage: registry.k8s.io/build-image/go-runner:v2.3.1-go1.22.4-bookworm.0 +defaultBaseImage: registry.k8s.io/build-image/go-runner:v2.3.1-go1.22.5-bookworm.0 diff --git a/Dockerfile b/Dockerfile index c0efd3074e..fba4a82dca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ ## BUILD ARGS ## ################################################################################ # This build arg allows the specification of a custom Golang image. -ARG GOLANG_IMAGE=golang:1.22.4 +ARG GOLANG_IMAGE=golang:1.22.5 # The distroless image on which the CPI manager image is built. # @@ -22,7 +22,7 @@ ARG GOLANG_IMAGE=golang:1.22.4 # deterministic builds. Follow what kubernetes uses to build # kube-controller-manager, for example for 1.23.x: # https://github.com/kubernetes/kubernetes/blob/release-1.24/build/common.sh#L94 -ARG DISTROLESS_IMAGE=registry.k8s.io/build-image/go-runner:v2.3.1-go1.22.4-bookworm.0 +ARG DISTROLESS_IMAGE=registry.k8s.io/build-image/go-runner:v2.3.1-go1.22.5-bookworm.0 ################################################################################ ## BUILD STAGE ## diff --git a/cloudbuild.yaml b/cloudbuild.yaml index e1bb9e5c84..fa8d449e4d 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -17,7 +17,7 @@ steps: - --platform=linux/amd64,linux/arm64 - . # Build cloudbuild artifacts (for attestation) - - name: 'docker.io/library/golang:1.22.4-bookworm' + - name: 'docker.io/library/golang:1.22.5-bookworm' id: cloudbuild-artifacts entrypoint: make env: diff --git a/go.mod b/go.mod index 9d3d33a66a..3b59abdb84 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module k8s.io/cloud-provider-aws -go 1.22.4 +go 1.22.5 require ( github.com/aws/aws-sdk-go v1.54.15 diff --git a/pkg/providers/v1/aws.go b/pkg/providers/v1/aws.go index d1f9e9b9c9..8977e3bf7e 100644 --- a/pkg/providers/v1/aws.go +++ b/pkg/providers/v1/aws.go @@ -3013,7 +3013,8 @@ func (c *Cloud) UpdateLoadBalancer(ctx context.Context, clusterName string, serv err = c.ensureLoadBalancerInstances(aws.StringValue(lb.LoadBalancerName), lb.Instances, instances) if err != nil { - return nil + klog.Warningf("Error registering/deregistering instances with the load balancer: %q", err) + return err } err = c.updateInstanceSecurityGroupsForLoadBalancer(lb, instances, service.Annotations) diff --git a/tests/e2e/go.mod b/tests/e2e/go.mod index 3cf08bc72c..262cf5808c 100644 --- a/tests/e2e/go.mod +++ b/tests/e2e/go.mod @@ -1,6 +1,6 @@ module k8s.io/cloud-provider-aws/tests/e2e -go 1.22.4 +go 1.22.5 require ( github.com/onsi/ginkgo/v2 v2.9.4