providers/proxy: improve error handling for non-tls ingresses

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-08-30 14:43:57 +02:00
parent 63f57b6a77
commit 3e9f5ec5ef

View file

@ -61,9 +61,10 @@ class IngressReconciler(KubernetesObjectReconciler[NetworkingV1beta1Ingress]):
have_hosts.sort() have_hosts.sort()
have_hosts_tls = [] have_hosts_tls = []
for tls_config in current.spec.tls: if current.spec.tls:
if tls_config and tls_config.hosts: for tls_config in current.spec.tls:
have_hosts_tls += tls_config.hosts if tls_config and tls_config.hosts:
have_hosts_tls += tls_config.hosts
have_hosts_tls.sort() have_hosts_tls.sort()
if have_hosts != expected_hosts: if have_hosts != expected_hosts: