Merge remote-tracking branch 'upstream/master' into namespace

This commit is contained in:
Martin Linkhorst 2017-03-07 17:51:36 +01:00
commit af5fc5ab0f
No known key found for this signature in database
GPG Key ID: CBE9EF3F75BAA5FD
3 changed files with 14 additions and 17 deletions

View File

@ -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)
})
}
}

View File

@ -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,
})
}
}
}

View File

@ -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)
})
}
}