mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-07 01:56:57 +02:00
provider hetzner: respect --dry-run
This commit is contained in:
parent
2f1aff4fe4
commit
30bc818eac
@ -141,6 +141,10 @@ func (p *HetznerProvider) submitChanges(ctx context.Context, changes []*HetznerC
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logMessage := "Changing record"
|
||||||
|
if p.DryRun {
|
||||||
|
logMessage = "Would change record"
|
||||||
|
}
|
||||||
log.WithFields(log.Fields{
|
log.WithFields(log.Fields{
|
||||||
"id": change.ResourceRecordSet.ID,
|
"id": change.ResourceRecordSet.ID,
|
||||||
"record": change.ResourceRecordSet.Name,
|
"record": change.ResourceRecordSet.Name,
|
||||||
@ -150,7 +154,10 @@ func (p *HetznerProvider) submitChanges(ctx context.Context, changes []*HetznerC
|
|||||||
"action": change.Action,
|
"action": change.Action,
|
||||||
"zone": change.ZoneName,
|
"zone": change.ZoneName,
|
||||||
"zone_id": change.ZoneID,
|
"zone_id": change.ZoneID,
|
||||||
}).Info("Changing record")
|
}).Info(logMessage)
|
||||||
|
if p.DryRun {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
switch change.Action {
|
switch change.Action {
|
||||||
case hetznerCreate:
|
case hetznerCreate:
|
||||||
|
Loading…
Reference in New Issue
Block a user