mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-12-15 16:51:00 +01:00
Merge remote-tracking branch 'upstream/master' into namespace
This commit is contained in:
commit
af5fc5ab0f
@ -94,12 +94,10 @@ func (p *GoogleProvider) Records(zone string) ([]endpoint.Endpoint, error) {
|
||||
}
|
||||
|
||||
for _, rr := range r.Rrdatas {
|
||||
endpoint := endpoint.Endpoint{
|
||||
endpoints = append(endpoints, endpoint.Endpoint{
|
||||
DNSName: r.Name,
|
||||
Target: rr,
|
||||
}
|
||||
|
||||
endpoints = append(endpoints, endpoint)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -59,16 +59,17 @@ func endpointsFromIngress(ing *v1beta1.Ingress) []endpoint.Endpoint {
|
||||
continue
|
||||
}
|
||||
for _, lb := range ing.Status.LoadBalancer.Ingress {
|
||||
endpoint := endpoint.Endpoint{
|
||||
DNSName: rule.Host,
|
||||
}
|
||||
if lb.IP != "" {
|
||||
endpoint.Target = lb.IP
|
||||
endpoints = append(endpoints, endpoint)
|
||||
endpoints = append(endpoints, endpoint.Endpoint{
|
||||
DNSName: rule.Host,
|
||||
Target: lb.IP,
|
||||
})
|
||||
}
|
||||
if lb.Hostname != "" {
|
||||
endpoint.Target = lb.Hostname
|
||||
endpoints = append(endpoints, endpoint)
|
||||
endpoints = append(endpoints, endpoint.Endpoint{
|
||||
DNSName: rule.Host,
|
||||
Target: lb.Hostname,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,18 +80,16 @@ func endpointsFromService(svc *v1.Service) []endpoint.Endpoint {
|
||||
// Create a corresponding endpoint for each configured external entrypoint.
|
||||
for _, lb := range svc.Status.LoadBalancer.Ingress {
|
||||
if lb.IP != "" {
|
||||
endpoint := endpoint.Endpoint{
|
||||
endpoints = append(endpoints, endpoint.Endpoint{
|
||||
DNSName: hostname,
|
||||
Target: lb.IP,
|
||||
}
|
||||
endpoints = append(endpoints, endpoint)
|
||||
})
|
||||
}
|
||||
if lb.Hostname != "" {
|
||||
endpoint := endpoint.Endpoint{
|
||||
endpoints = append(endpoints, endpoint.Endpoint{
|
||||
DNSName: hostname,
|
||||
Target: lb.Hostname,
|
||||
}
|
||||
endpoints = append(endpoints, endpoint)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user