diff --git a/controllers/service/service_controller.go b/controllers/service/service_controller.go index d21ee71ee..c32b4a78c 100644 --- a/controllers/service/service_controller.go +++ b/controllers/service/service_controller.go @@ -4,8 +4,6 @@ import ( "context" "fmt" - "sigs.k8s.io/aws-load-balancer-controller/pkg/ingress" - "github.com/go-logr/logr" "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" @@ -18,6 +16,7 @@ import ( "sigs.k8s.io/aws-load-balancer-controller/pkg/deploy" elbv2deploy "sigs.k8s.io/aws-load-balancer-controller/pkg/deploy/elbv2" "sigs.k8s.io/aws-load-balancer-controller/pkg/deploy/tracking" + "sigs.k8s.io/aws-load-balancer-controller/pkg/ingress" "sigs.k8s.io/aws-load-balancer-controller/pkg/k8s" "sigs.k8s.io/aws-load-balancer-controller/pkg/model/core" elbv2model "sigs.k8s.io/aws-load-balancer-controller/pkg/model/elbv2" diff --git a/pkg/service/model_build_listener.go b/pkg/service/model_build_listener.go index fced08ff1..1fe4d238a 100644 --- a/pkg/service/model_build_listener.go +++ b/pkg/service/model_build_listener.go @@ -125,7 +125,7 @@ func (t *defaultModelBuildTask) buildListenerCertificates(ctx context.Context) ( if t.annotationParser.ParseStringSliceAnnotation(annotations.SvcLBSuffixSSLDomains, &rawSSLDomains, t.service.Annotations) { autoDiscoveredCertARNs, err := t.certDiscovery.Discover(ctx, rawSSLDomains) if err != nil { - return certificates, err + return nil, err } for _, cert := range autoDiscoveredCertARNs { certificates = append(certificates, elbv2model.Certificate{ diff --git a/pkg/service/model_builder.go b/pkg/service/model_builder.go index 694f3940c..aea06077a 100644 --- a/pkg/service/model_builder.go +++ b/pkg/service/model_builder.go @@ -5,9 +5,6 @@ import ( "strconv" "sync" - "github.com/go-logr/logr" - "sigs.k8s.io/aws-load-balancer-controller/pkg/ingress" - "github.com/aws/aws-sdk-go/service/ec2" "github.com/go-logr/logr" "github.com/pkg/errors" @@ -18,6 +15,7 @@ import ( "sigs.k8s.io/aws-load-balancer-controller/pkg/config" elbv2deploy "sigs.k8s.io/aws-load-balancer-controller/pkg/deploy/elbv2" "sigs.k8s.io/aws-load-balancer-controller/pkg/deploy/tracking" + "sigs.k8s.io/aws-load-balancer-controller/pkg/ingress" "sigs.k8s.io/aws-load-balancer-controller/pkg/k8s" "sigs.k8s.io/aws-load-balancer-controller/pkg/model/core" elbv2model "sigs.k8s.io/aws-load-balancer-controller/pkg/model/elbv2" diff --git a/pkg/service/model_builder_test.go b/pkg/service/model_builder_test.go index 25e6df3d7..1f2358123 100644 --- a/pkg/service/model_builder_test.go +++ b/pkg/service/model_builder_test.go @@ -5,9 +5,6 @@ import ( "testing" "time" - "github.com/go-logr/logr" - "sigs.k8s.io/aws-load-balancer-controller/pkg/ingress" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" elbv2sdk "github.com/aws/aws-sdk-go/service/elbv2" @@ -24,6 +21,7 @@ import ( "sigs.k8s.io/aws-load-balancer-controller/pkg/deploy" "sigs.k8s.io/aws-load-balancer-controller/pkg/deploy/elbv2" "sigs.k8s.io/aws-load-balancer-controller/pkg/deploy/tracking" + "sigs.k8s.io/aws-load-balancer-controller/pkg/ingress" "sigs.k8s.io/aws-load-balancer-controller/pkg/networking" "sigs.k8s.io/controller-runtime/pkg/log" )