From 3e9f5ec5ef91dd2a80de626d085a0a915ebb7ad4 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 30 Aug 2021 14:43:57 +0200 Subject: [PATCH] providers/proxy: improve error handling for non-tls ingresses Signed-off-by: Jens Langhammer --- authentik/providers/proxy/controllers/k8s/ingress.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/authentik/providers/proxy/controllers/k8s/ingress.py b/authentik/providers/proxy/controllers/k8s/ingress.py index bb6cbe908..07d3d8c08 100644 --- a/authentik/providers/proxy/controllers/k8s/ingress.py +++ b/authentik/providers/proxy/controllers/k8s/ingress.py @@ -61,9 +61,10 @@ class IngressReconciler(KubernetesObjectReconciler[NetworkingV1beta1Ingress]): have_hosts.sort() have_hosts_tls = [] - for tls_config in current.spec.tls: - if tls_config and tls_config.hosts: - have_hosts_tls += tls_config.hosts + if current.spec.tls: + for tls_config in current.spec.tls: + if tls_config and tls_config.hosts: + have_hosts_tls += tls_config.hosts have_hosts_tls.sort() if have_hosts != expected_hosts: