From cbfa51fb31b312fcc3b973f2a43066c1fba799a5 Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Tue, 4 Mar 2025 16:48:25 +0100 Subject: [PATCH] providers/proxy: kubernetes outpost: fix reconcile when only annotations changed (cherry-pick #13372) (#13384) providers/proxy: kubernetes outpost: fix reconcile when only annotations changed (#13372) * providers/proxy: kubernetes outpost: fix reconcile when only annotations changed * fixup --------- Signed-off-by: Marc 'risson' Schmitt Co-authored-by: Marc 'risson' Schmitt --- authentik/providers/proxy/controllers/k8s/ingress.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/authentik/providers/proxy/controllers/k8s/ingress.py b/authentik/providers/proxy/controllers/k8s/ingress.py index 9c3c6755a6..73bd47ace9 100644 --- a/authentik/providers/proxy/controllers/k8s/ingress.py +++ b/authentik/providers/proxy/controllers/k8s/ingress.py @@ -36,17 +36,17 @@ class IngressReconciler(KubernetesObjectReconciler[V1Ingress]): def reconciler_name() -> str: return "ingress" - def _check_annotations(self, reference: V1Ingress): + def _check_annotations(self, current: V1Ingress, reference: V1Ingress): """Check that all annotations *we* set are correct""" - for key, value in self.get_ingress_annotations().items(): - if key not in reference.metadata.annotations: + for key, value in reference.metadata.annotations.items(): + if key not in current.metadata.annotations: raise NeedsUpdate() - if reference.metadata.annotations[key] != value: + if current.metadata.annotations[key] != value: raise NeedsUpdate() def reconcile(self, current: V1Ingress, reference: V1Ingress): super().reconcile(current, reference) - self._check_annotations(reference) + self._check_annotations(current, reference) # Create a list of all expected host and tls hosts expected_hosts = [] expected_hosts_tls = []