Skip to content

Commit

Permalink
[fix] Add to dns only if machines are ready + Fix AWS sdk behavior (#639
Browse files Browse the repository at this point in the history
)

* Add to dns only if machines are ready

* aws sdk shenanigans
  • Loading branch information
tchinmai7 authored Jan 24, 2025
1 parent 1bdf877 commit 79231be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cloud/scope/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ func CreateS3Clients(ctx context.Context, crClient K8sClient, cluster infrav1alp
var (
configOpts = []func(*awsconfig.LoadOptions) error{
awsconfig.WithRegion("auto"),
awsconfig.WithRequestChecksumCalculation(aws.RequestChecksumCalculationWhenRequired),
awsconfig.WithResponseChecksumValidation(aws.ResponseChecksumValidationWhenRequired),
}

clientOpts = []func(*s3.Options){}
Expand Down
3 changes: 3 additions & 0 deletions cloud/services/domains.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ func EnsureDNSEntries(ctx context.Context, cscope *scope.ClusterScope, operation

func getMachineIPs(cscope *scope.ClusterScope) (ipv4IPs, ipv6IPs []string, err error) {
for _, eachMachine := range cscope.LinodeMachines.Items {
if !eachMachine.Status.Ready {
continue
}
for _, IPs := range eachMachine.Status.Addresses {
if IPs.Type != v1beta1.MachineExternalIP {
continue
Expand Down

0 comments on commit 79231be

Please # to comment.