From 73860acb3efc009424e85896ab07edb00acb3770 Mon Sep 17 00:00:00 2001 From: Christian Bianchi Date: Wed, 31 Jan 2024 13:40:29 +0100 Subject: [PATCH] Fix Route53 list hosted zones to avoid pagination issue. --- CHANGELOG.md | 4 ++++ pkg/project/project.go | 4 ++-- service/internal/cphostedzone/cphostedzone.go | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53af2840c0..32fea9ddc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Fix Route53 list hosted zones to avoid pagination issue. + ## [14.24.1] - 2023-12-07 ### Changed diff --git a/pkg/project/project.go b/pkg/project/project.go index 40aa2d542b..c13fcf9fbc 100644 --- a/pkg/project/project.go +++ b/pkg/project/project.go @@ -5,7 +5,7 @@ var ( gitSHA = "n/a" name string = "aws-operator" source string = "https://github.com/giantswarm/aws-operator" - version = "14.24.1" + //version = "14.24.1-patch1" ) func Description() string { @@ -25,5 +25,5 @@ func Source() string { } func Version() string { - return version + return "14.24.1" } diff --git a/service/internal/cphostedzone/cphostedzone.go b/service/internal/cphostedzone/cphostedzone.go index 975fbedde4..30bd3a7b2b 100644 --- a/service/internal/cphostedzone/cphostedzone.go +++ b/service/internal/cphostedzone/cphostedzone.go @@ -5,6 +5,7 @@ import ( "fmt" "sync" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/route53" infrastructurev1alpha3 "github.com/giantswarm/apiextensions/v6/pkg/apis/infrastructure/v1alpha3" "github.com/giantswarm/microerror" @@ -109,7 +110,9 @@ func (h *HostedZone) lookup(ctx context.Context, client Route53, cr infrastructu // installation. So we look it up. h.logger.Debugf(ctx, "finding CP HostedZone IDs") - hostedZonesInput := &route53.ListHostedZonesByNameInput{} + hostedZonesInput := &route53.ListHostedZonesByNameInput{ + DNSName: aws.String(cr.Spec.Cluster.DNS.Domain), + } o, err := client.ListHostedZonesByName(hostedZonesInput) if err != nil {