mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-25 19:00:59 +02:00
Group By Endpoint names per Hosted Zone on AWS
This commit is contained in:
parent
e55200ae74
commit
7c7a1c30ef
@ -995,12 +995,12 @@ func changesByZone(zones map[string]*route53.HostedZone, changeSet Route53Change
|
||||
}
|
||||
for _, z := range zones {
|
||||
// Initialize the map for the Current Zone & Record Type if it doesn't exist
|
||||
if visitedHostnames[aws.StringValue(z.Id)][c.ResourceRecordSet.Type] == nil {
|
||||
visitedHostnames[aws.StringValue(z.Id)][c.ResourceRecordSet.Type] = make(map[string]bool)
|
||||
if visitedHostnames[aws.StringValue(z.Id)][*c.ResourceRecordSet.Type] == nil {
|
||||
visitedHostnames[aws.StringValue(z.Id)][*c.ResourceRecordSet.Type] = make(map[string]bool)
|
||||
}
|
||||
|
||||
if visitedHostnames[aws.StringValue(z.Id)][c.ResourceRecordSet.Type][hostname] {
|
||||
log.Debugf("Skipping duplicate %s to zone %s [Id: %s] RecordType: %s", hostname, aws.StringValue(z.Name), aws.StringValue(z.Id), c.ResourceRecordSet.Type)
|
||||
if visitedHostnames[aws.StringValue(z.Id)][*c.ResourceRecordSet.Type][hostname] {
|
||||
log.Debugf("Skipping duplicate %s to zone %s [Id: %s] RecordType: %s", hostname, aws.StringValue(z.Name), aws.StringValue(z.Id), *c.ResourceRecordSet.Type)
|
||||
continue
|
||||
}
|
||||
|
||||
@ -1019,8 +1019,8 @@ func changesByZone(zones map[string]*route53.HostedZone, changeSet Route53Change
|
||||
}
|
||||
}
|
||||
changes[aws.StringValue(z.Id)] = append(changes[aws.StringValue(z.Id)], c)
|
||||
visitedHostnames[aws.StringValue(z.Id)][c.ResourceRecordSet.Type][hostname] = true
|
||||
log.Debugf("Adding %s to zone %s [Id: %s] RecordType: %s", hostname, aws.StringValue(z.Name), aws.StringValue(z.Id), c.ResourceRecordSet.Type)
|
||||
visitedHostnames[aws.StringValue(z.Id)][*c.ResourceRecordSet.Type][hostname] = true
|
||||
log.Debugf("Adding %s to zone %s [Id: %s] RecordType: %s", hostname, aws.StringValue(z.Name), aws.StringValue(z.Id), *c.ResourceRecordSet.Type)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user