Skip to content

Commit

Permalink
Fix imports and cleanup returns in certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
Kavinraja-G committed Jun 1, 2024
1 parent a1ba0f8 commit 7c1b2f6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
3 changes: 1 addition & 2 deletions controllers/service/service_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pkg/service/model_build_listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
4 changes: 1 addition & 3 deletions pkg/service/model_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
4 changes: 1 addition & 3 deletions pkg/service/model_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
)
Expand Down

0 comments on commit 7c1b2f6

Please sign in to comment.