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:
commit
dfa4f8a61e
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