fix the same udp port and tcp port, update nginx.conf error
@@ -305,7 +305,6 @@ func newIngressController(config *Configuration) *GenericController {
} else {
glog.Warning("Update of ingress status is disabled (flag --update-status=false was specified)")
}
-
ic.annotations = newAnnotationExtractor(ic)
ic.cfg.Backend.SetListers(ingress.StoreLister{
@@ -506,20 +505,24 @@ func (ic *GenericController) getStreamServices(configmapName string, proto api.P
glog.V(3).Infof("searching service %v/%v endpoints using the name '%v'", svcNs, svcName, svcPort)
for _, sp := range svc.Spec.Ports {
if sp.Name == svcPort {
+ if sp.Protocol == proto {
endps = ic.getEndpoints(svc, &sp, proto, &healthcheck.Upstream{})
break
}
}
+ }
} else {
// we need to use the TargetPort (where the endpoints are running)
glog.V(3).Infof("searching service %v/%v endpoints using the target port '%v'", svcNs, svcName, targetPort)
for _, sp := range svc.Spec.Ports {
if sp.Port == int32(targetPort) {
+ if sp.Protocol == proto {
endps = ic.getEndpoints(svc, &sp, proto, &healthcheck.Upstream{})
break
}
}
}
+ }
// stream services cannot contain empty upstreams and there is no
// default backend equivalent
