Track default SSL cert if TLS.SecretName is empty
This commit is contained in:
parent
0f9f082959
commit
1d9047e155
1 changed files with 6 additions and 1 deletions
|
@ -1094,7 +1094,12 @@ func (ic GenericController) extractSecretNames(ing *extensions.Ingress) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tls := range ing.Spec.TLS {
|
for _, tls := range ing.Spec.TLS {
|
||||||
key := fmt.Sprintf("%v/%v", ing.Namespace, tls.SecretName)
|
var key string
|
||||||
|
if tls.SecretName == "" {
|
||||||
|
key = ic.cfg.DefaultSSLCertificate
|
||||||
|
} else {
|
||||||
|
key = fmt.Sprintf("%v/%v", ing.Namespace, tls.SecretName)
|
||||||
|
}
|
||||||
_, exists := ic.secretTracker.Get(key)
|
_, exists := ic.secretTracker.Get(key)
|
||||||
if !exists {
|
if !exists {
|
||||||
ic.secretTracker.Add(key, key)
|
ic.secretTracker.Add(key, key)
|
||||||
|
|
Loading…
Reference in a new issue