fix: Don't try and find local certs when secretName is not specified
Fixes #3048
This commit is contained in:
parent
3f6314aa2f
commit
66486203db
1 changed files with 6 additions and 0 deletions
|
@ -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
|
// no TLS host matching host name, try each TLS host for matching SAN or CN
|
||||||
for _, tls := range ing.Spec.TLS {
|
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)
|
secrKey := fmt.Sprintf("%v/%v", ing.Namespace, tls.SecretName)
|
||||||
|
|
||||||
cert, err := getLocalSSLCert(secrKey)
|
cert, err := getLocalSSLCert(secrKey)
|
||||||
|
|
Loading…
Reference in a new issue