commit
2d6f811151
3 changed files with 17 additions and 12 deletions
|
@ -85,11 +85,12 @@ func newNGINXController() *NGINXController {
|
|||
}
|
||||
|
||||
n := &NGINXController{
|
||||
binary: ngx,
|
||||
configmap: &api_v1.ConfigMap{},
|
||||
isIPV6Enabled: isIPv6Enabled(),
|
||||
resolver: h,
|
||||
ports: &config.ListenPorts{},
|
||||
binary: ngx,
|
||||
configmap: &api_v1.ConfigMap{},
|
||||
isIPV6Enabled: isIPv6Enabled(),
|
||||
resolver: h,
|
||||
ports: &config.ListenPorts{},
|
||||
backendDefaults: config.NewDefault().Backend,
|
||||
}
|
||||
|
||||
fcgiListener, err := net.Listen("unix", fastCGISocket)
|
||||
|
|
|
@ -601,18 +601,17 @@ type ingressInformation struct {
|
|||
func getIngressInformation(i, p interface{}) *ingressInformation {
|
||||
ing, ok := i.(*extensions.Ingress)
|
||||
if !ok {
|
||||
glog.Errorf("expected an Ingress type but %T was returned", i)
|
||||
glog.V(3).Infof("expected an Ingress type but %T was returned", i)
|
||||
return &ingressInformation{}
|
||||
}
|
||||
|
||||
path, ok := p.(string)
|
||||
if !ok {
|
||||
glog.Errorf("expected a string type but %T was returned", p)
|
||||
glog.V(3).Infof("expected a string type but %T was returned", p)
|
||||
return &ingressInformation{}
|
||||
}
|
||||
|
||||
if ing == nil {
|
||||
glog.Errorf("expected an Ingress")
|
||||
return &ingressInformation{}
|
||||
}
|
||||
|
||||
|
|
|
@ -1169,7 +1169,12 @@ func (ic *GenericController) createServers(data []interface{},
|
|||
servers[host].Alias = aliasAnnotation
|
||||
|
||||
// only add a certificate if the server does not have one previously configured
|
||||
if len(ing.Spec.TLS) == 0 || servers[host].SSLCertificate != "" {
|
||||
if servers[host].SSLCertificate != "" {
|
||||
continue
|
||||
}
|
||||
|
||||
if len(ing.Spec.TLS) == 0 {
|
||||
glog.V(3).Infof("ingress %v/%v for host %v does not contains a TLS section", ing.Namespace, ing.Name, host)
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -1183,9 +1188,9 @@ func (ic *GenericController) createServers(data []interface{},
|
|||
}
|
||||
}
|
||||
|
||||
// the current ing.Spec.Rules[].Host doesn't have an entry at
|
||||
// ing.Spec.TLS[].Hosts[] skipping to the next Rule
|
||||
if !found {
|
||||
glog.Warningf("ingress %v/%v for host %v contains a TLS section but none of the host match",
|
||||
ing.Namespace, ing.Name, host)
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -1199,7 +1204,7 @@ func (ic *GenericController) createServers(data []interface{},
|
|||
key := fmt.Sprintf("%v/%v", ing.Namespace, tlsSecretName)
|
||||
bc, exists := ic.sslCertTracker.Get(key)
|
||||
if !exists {
|
||||
glog.Infof("ssl certificate \"%v\" does not exist in local store", key)
|
||||
glog.Warningf("ssl certificate \"%v\" does not exist in local store", key)
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue