providers/proxy: check ingress annotations we manage
This commit is contained in:
parent
6fe323f1a7
commit
6ed78830a0
|
@ -37,10 +37,19 @@ class IngressReconciler(KubernetesObjectReconciler[NetworkingV1beta1Ingress]):
|
|||
def name(self) -> str:
|
||||
return f"authentik-outpost-{self.controller.outpost.uuid.hex}"
|
||||
|
||||
def _check_annotations(self, reference: NetworkingV1beta1Ingress):
|
||||
"""Check that all annotations *we* set are correct"""
|
||||
for key, value in self.get_ingress_annotations().items():
|
||||
if key not in reference.metadata.annotations:
|
||||
raise NeedsUpdate()
|
||||
if reference.metadata.annotations[key] != value:
|
||||
raise NeedsUpdate()
|
||||
|
||||
def reconcile(
|
||||
self, current: NetworkingV1beta1Ingress, reference: NetworkingV1beta1Ingress
|
||||
):
|
||||
super().reconcile(current, reference)
|
||||
self._check_annotations(reference)
|
||||
# Create a list of all expected host and tls hosts
|
||||
expected_hosts = []
|
||||
expected_hosts_tls = []
|
||||
|
|
Reference in New Issue