Fixes per code review

This commit is contained in:
Justin Santa Barbara 2016-11-13 22:29:48 -05:00
parent b8729f2738
commit 5d8ebcd34f
1 changed files with 4 additions and 3 deletions

View File

@ -151,14 +151,14 @@ func (c *ServiceController) updateServiceRecords(service *v1.Service) {
RecordType: dns.RecordTypeCNAME, RecordType: dns.RecordTypeCNAME,
Value: ingress.Hostname, Value: ingress.Hostname,
}) })
glog.V(4).Infof("Found CNAME for service %s/%s: %q", service.Namespace, service.Name, ingress.Hostname) glog.V(4).Infof("Found CNAME record for service %s/%s: %q", service.Namespace, service.Name, ingress.Hostname)
} }
if ingress.IP != "" { if ingress.IP != "" {
ingresses = append(ingresses, dns.Record{ ingresses = append(ingresses, dns.Record{
RecordType: dns.RecordTypeA, RecordType: dns.RecordTypeA,
Value: ingress.IP, Value: ingress.IP,
}) })
glog.V(4).Infof("Found A for service %s/%s: %q", service.Namespace, service.Name, ingress.IP) glog.V(4).Infof("Found A record for service %s/%s: %q", service.Namespace, service.Name, ingress.IP)
} }
} }
} else if service.Spec.Type == v1.ServiceTypeNodePort { } else if service.Spec.Type == v1.ServiceTypeNodePort {
@ -168,6 +168,7 @@ func (c *ServiceController) updateServiceRecords(service *v1.Service) {
}) })
glog.V(4).Infof("Setting internal alias for NodePort service %s/%s", service.Namespace, service.Name) glog.V(4).Infof("Setting internal alias for NodePort service %s/%s", service.Namespace, service.Name)
} else { } else {
// TODO: Emit event so that users are informed of this
glog.V(2).Infof("Cannot expose service %s/%s of type %q", service.Namespace, service.Name, service.Spec.Type) glog.V(2).Infof("Cannot expose service %s/%s of type %q", service.Namespace, service.Name, service.Spec.Type)
} }
@ -184,7 +185,7 @@ func (c *ServiceController) updateServiceRecords(service *v1.Service) {
} }
} }
} else { } else {
glog.V(4).Infof("Service %s/%s did not have %s annotation", service.Namespace, service.Name, AnnotationNameDnsExternal) glog.V(8).Infof("Service %s/%s did not have %s annotation", service.Namespace, service.Name, AnnotationNameDnsExternal)
} }
c.scope.Replace(service.Name, records) c.scope.Replace(service.Name, records)