From 0c6e781e5b725bbbf79ad3c9b61733541ba54880 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 29 Aug 2021 20:49:11 +0200 Subject: [PATCH] providers/proxy: fix traefik middleware being generated with wrong ports for embedded outposts Signed-off-by: Jens Langhammer --- authentik/providers/proxy/controllers/k8s/traefik.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/authentik/providers/proxy/controllers/k8s/traefik.py b/authentik/providers/proxy/controllers/k8s/traefik.py index adc19ca91..0f850f74b 100644 --- a/authentik/providers/proxy/controllers/k8s/traefik.py +++ b/authentik/providers/proxy/controllers/k8s/traefik.py @@ -96,6 +96,7 @@ class TraefikMiddlewareReconciler(KubernetesObjectReconciler[TraefikMiddleware]) def get_reference_object(self) -> TraefikMiddleware: """Get deployment object for outpost""" + port = 9000 if self.is_embedded else 4180 return TraefikMiddleware( apiVersion=f"{CRD_GROUP}/{CRD_VERSION}", kind="Middleware", @@ -106,7 +107,7 @@ class TraefikMiddlewareReconciler(KubernetesObjectReconciler[TraefikMiddleware]) ), spec=TraefikMiddlewareSpec( forwardAuth=TraefikMiddlewareSpecForwardAuth( - address=f"http://{self.name}.{self.namespace}:4180/akprox/auth?traefik", + address=f"http://{self.name}.{self.namespace}:{port}/akprox/auth?traefik", authResponseHeaders=[ "Set-Cookie", "X-Auth-Username",