mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-10-13 02:41:00 +02:00
Fixed some formating mistakes
Signed-off-by: João Marçal <joao.marcal12@gmail.com>
This commit is contained in:
parent
9f6ebfa06d
commit
cb3f8c9ca5
@ -126,27 +126,27 @@ func (cs *crdSource) Endpoints() ([]*endpoint.Endpoint, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
illegalTarget := false
|
illegalTarget := false
|
||||||
for _, target := range ep.Targets{
|
for _, target := range ep.Targets {
|
||||||
if strings.HasSuffix(target, "."){
|
if strings.HasSuffix(target, ".") {
|
||||||
illegalTarget = true
|
illegalTarget = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if illegalTarget{
|
if illegalTarget {
|
||||||
log.Warnf("Endpoint %s with DNSName %s has Target illegal target. The subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com')", dnsEndpoint.ObjectMeta.Name, ep.DNSName)
|
log.Warnf("Endpoint %s with DNSName %s has Target illegal target. The subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com')", dnsEndpoint.ObjectMeta.Name, ep.DNSName)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if ep.Labels == nil{
|
if ep.Labels == nil {
|
||||||
ep.Labels = endpoint.NewLabels()
|
ep.Labels = endpoint.NewLabels()
|
||||||
}
|
}
|
||||||
|
|
||||||
crdEndpoints = append(crdEndpoints, ep)
|
crdEndpoints = append(crdEndpoints, ep)
|
||||||
}
|
}
|
||||||
|
|
||||||
cs.setResourceLabel(&dnsEndpoint, crdEndpoints)
|
cs.setResourceLabel(&dnsEndpoint, crdEndpoints)
|
||||||
endpoints = append(endpoints, crdEndpoints...)
|
endpoints = append(endpoints, crdEndpoints...)
|
||||||
|
|
||||||
if dnsEndpoint.Status.ObservedGeneration == dnsEndpoint.Generation {
|
if dnsEndpoint.Status.ObservedGeneration == dnsEndpoint.Generation {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user