From e34dd738e54a0865f75e088f5356d44586a445e0 Mon Sep 17 00:00:00 2001 From: Jay Deokar Date: Wed, 17 Jul 2024 21:03:38 -0700 Subject: [PATCH] Handle error while registring/deregistring target during load balancer update --- go.mod | 2 +- pkg/providers/v1/aws.go | 3 ++- tests/e2e/go.mod | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) 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..32291d6b9d 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/deregistring 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