fix: Don't try and find local certs when secretName is not specified

Fixes #3048
This commit is contained in:
Mike Bryant 2018-09-06 11:35:16 +01:00
parent 3f6314aa2f
commit 66486203db

View file

@ -1120,6 +1120,12 @@ func extractTLSSecretName(host string, ing *extensions.Ingress,
// no TLS host matching host name, try each TLS host for matching SAN or CN
for _, tls := range ing.Spec.TLS {
if tls.SecretName == "" {
// There's no secretName specified, so it will never be available
continue
}
secrKey := fmt.Sprintf("%v/%v", ing.Namespace, tls.SecretName)
cert, err := getLocalSSLCert(secrKey)