Merge pull request #3049 from ocadotechnology/wip-3048

fix: Don't try and find local certs when secretName is not specified
This commit is contained in:
k8s-ci-robot 2018-09-06 06:19:40 -07:00 committed by GitHub
commit dfa4f8a61e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)