Rename endPoint to endpoint for crd implementation.

This commit is contained in:
Arturo Contreras 2019-06-04 11:52:36 -06:00
parent 5df90d6900
commit bde9957e48

View File

@ -118,12 +118,12 @@ func (cs *crdSource) Endpoints() ([]*endpoint.Endpoint, error) {
for _, dnsEndpoint := range result.Items { for _, dnsEndpoint := range result.Items {
// Make sure that all endpoints have targets for A or CNAME type // Make sure that all endpoints have targets for A or CNAME type
for _, endPoint := range dnsEndpoint.Spec.Endpoints { for _, endpoint := range dnsEndpoint.Spec.Endpoints {
if (endPoint.RecordType == "CNAME" || endPoint.RecordType == "A") && len(endPoint.Targets) < 1 { if (endpoint.RecordType == "CNAME" || endpoint.RecordType == "A") && len(endpoint.Targets) < 1 {
log.Warnf("Endpoint %s with DNSName %s has an empty list of targets", dnsEndpoint.ObjectMeta.Name, endPoint.DNSName) log.Warnf("Endpoint %s with DNSName %s has an empty list of targets", dnsEndpoint.ObjectMeta.Name, endpoint.DNSName)
continue continue
} }
endpoints = append(endpoints, endPoint) endpoints = append(endpoints, endpoint)
} }
if dnsEndpoint.Status.ObservedGeneration == dnsEndpoint.Generation { if dnsEndpoint.Status.ObservedGeneration == dnsEndpoint.Generation {