From 66486203dbb95dddba69a88dc33a350e0b6bc6f1 Mon Sep 17 00:00:00 2001 From: Mike Bryant Date: Thu, 6 Sep 2018 11:35:16 +0100 Subject: [PATCH] fix: Don't try and find local certs when secretName is not specified Fixes #3048 --- internal/ingress/controller/controller.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/ingress/controller/controller.go b/internal/ingress/controller/controller.go index 1f219ad05..ea9c06a61 100644 --- a/internal/ingress/controller/controller.go +++ b/internal/ingress/controller/controller.go @@ -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)