mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 09:36:58 +02:00
Fix format on aws and endpoint files
This commit is contained in:
parent
846f4b40fa
commit
294b4c673e
@ -298,7 +298,7 @@ func FilterEndpointsByOwnerID(ownerID string, eps []*Endpoint) []*Endpoint {
|
||||
key := EndpointKey{DNSName: ep.DNSName, RecordType: ep.RecordType, SetIdentifier: ep.SetIdentifier}
|
||||
if visited[key] { //Do not contain duplicated endpoints
|
||||
log.Debugf(`Already loaded endpoint %v `, ep)
|
||||
continue
|
||||
continue
|
||||
}
|
||||
if endpointOwner, ok := ep.Labels[OwnerLabelKey]; !ok || endpointOwner != ownerID {
|
||||
log.Debugf(`Skipping endpoint %v because owner id does not match, found: "%s", required: "%s"`, ep, endpointOwner, ownerID)
|
||||
|
@ -994,28 +994,28 @@ func changesByZone(zones map[string]*route53.HostedZone, changeSet Route53Change
|
||||
continue
|
||||
}
|
||||
for _, z := range zones {
|
||||
// IMPORTANT EXPLAIN: I tried to fix this in here but a lot of tests started to fail in cascade.
|
||||
// IMPORTANT EXPLAIN: I tried to fix this in here but a lot of tests started to fail in cascade.
|
||||
// Found that nil recordTypes are entering in this function
|
||||
// So disabling the continue will skip the deletion of duplicated records
|
||||
// But this is the way we want to go. Also adding more visibility using recordType on Debug
|
||||
var recordType string
|
||||
if c.ResourceRecordSet.Type != nil && *c.ResourceRecordSet.Type != "" {
|
||||
recordType = *c.ResourceRecordSet.Type
|
||||
recordType = *c.ResourceRecordSet.Type
|
||||
} else {
|
||||
recordType = "EmptyRecordType"
|
||||
recordType = "EmptyRecordType"
|
||||
}
|
||||
log.Debugf("Creating key for %s to zone %s with type %s", hostname, aws.StringValue(z.Id), recordType)
|
||||
key := fmt.Sprintf("%s_%s", hostname, recordType)
|
||||
log.Debugf("Key Output: %s", key)
|
||||
// Initialize the map for the current zone if it doesn't exist
|
||||
if visitedHostnames[aws.StringValue(z.Id)] == nil {
|
||||
visitedHostnames[aws.StringValue(z.Id)] = make(map[string]bool)
|
||||
}
|
||||
if visitedHostnames[aws.StringValue(z.Id)] == nil {
|
||||
visitedHostnames[aws.StringValue(z.Id)] = make(map[string]bool)
|
||||
}
|
||||
|
||||
if visitedHostnames[aws.StringValue(z.Id)][key] {
|
||||
log.Debugf("Skipping duplicate %s to zone %s [Id: %s] Type: %s", hostname, aws.StringValue(z.Name), aws.StringValue(z.Id), recordType)
|
||||
//continue
|
||||
}
|
||||
log.Debugf("Skipping duplicate %s to zone %s [Id: %s] Type: %s", hostname, aws.StringValue(z.Name), aws.StringValue(z.Id), recordType)
|
||||
//continue
|
||||
}
|
||||
if c.ResourceRecordSet.AliasTarget != nil && aws.StringValue(c.ResourceRecordSet.AliasTarget.HostedZoneId) == sameZoneAlias {
|
||||
// alias record is to be created; target needs to be in the same zone as endpoint
|
||||
// if it's not, this will fail
|
||||
|
Loading…
Reference in New Issue
Block a user