Skip to content

Commit 1d9047e

Browse files
committed
Track default SSL cert if TLS.SecretName is empty
1 parent 0f9f082 commit 1d9047e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

core/pkg/ingress/controller/controller.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,12 @@ func (ic GenericController) extractSecretNames(ing *extensions.Ingress) {
10941094
}
10951095

10961096
for _, tls := range ing.Spec.TLS {
1097-
key := fmt.Sprintf("%v/%v", ing.Namespace, tls.SecretName)
1097+
var key string
1098+
if tls.SecretName == "" {
1099+
key = ic.cfg.DefaultSSLCertificate
1100+
} else {
1101+
key = fmt.Sprintf("%v/%v", ing.Namespace, tls.SecretName)
1102+
}
10981103
_, exists := ic.secretTracker.Get(key)
10991104
if !exists {
11001105
ic.secretTracker.Add(key, key)

0 commit comments

Comments
 (0)