mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-07 10:06:57 +02:00
chore(provider/aws): reduce if-nesting, dryRun
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
This commit is contained in:
parent
8703fd4824
commit
a03ba1fa2c
@ -734,7 +734,11 @@ func (p *AWSProvider) submitChanges(ctx context.Context, changes Route53Changes,
|
|||||||
log.Infof("Desired change: %s %s %s", c.Action, *c.ResourceRecordSet.Name, c.ResourceRecordSet.Type)
|
log.Infof("Desired change: %s %s %s", c.Action, *c.ResourceRecordSet.Name, c.ResourceRecordSet.Type)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !p.dryRun {
|
if p.dryRun {
|
||||||
|
log.Debug("Dry run mode, skipping change submission")
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
params := &route53.ChangeResourceRecordSetsInput{
|
params := &route53.ChangeResourceRecordSetsInput{
|
||||||
HostedZoneId: aws.String(z),
|
HostedZoneId: aws.String(z),
|
||||||
ChangeBatch: &route53types.ChangeBatch{
|
ChangeBatch: &route53types.ChangeBatch{
|
||||||
@ -785,7 +789,6 @@ func (p *AWSProvider) submitChanges(ctx context.Context, changes Route53Changes,
|
|||||||
time.Sleep(p.batchChangeInterval)
|
time.Sleep(p.batchChangeInterval)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if failedUpdate {
|
if failedUpdate {
|
||||||
failedZones = append(failedZones, z)
|
failedZones = append(failedZones, z)
|
||||||
|
Loading…
Reference in New Issue
Block a user