providers/proxy: fix traefik middleware being generated with wrong ports for embedded outposts
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
7294d8fca5
commit
0c6e781e5b
|
@ -96,6 +96,7 @@ class TraefikMiddlewareReconciler(KubernetesObjectReconciler[TraefikMiddleware])
|
||||||
|
|
||||||
def get_reference_object(self) -> TraefikMiddleware:
|
def get_reference_object(self) -> TraefikMiddleware:
|
||||||
"""Get deployment object for outpost"""
|
"""Get deployment object for outpost"""
|
||||||
|
port = 9000 if self.is_embedded else 4180
|
||||||
return TraefikMiddleware(
|
return TraefikMiddleware(
|
||||||
apiVersion=f"{CRD_GROUP}/{CRD_VERSION}",
|
apiVersion=f"{CRD_GROUP}/{CRD_VERSION}",
|
||||||
kind="Middleware",
|
kind="Middleware",
|
||||||
|
@ -106,7 +107,7 @@ class TraefikMiddlewareReconciler(KubernetesObjectReconciler[TraefikMiddleware])
|
||||||
),
|
),
|
||||||
spec=TraefikMiddlewareSpec(
|
spec=TraefikMiddlewareSpec(
|
||||||
forwardAuth=TraefikMiddlewareSpecForwardAuth(
|
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=[
|
authResponseHeaders=[
|
||||||
"Set-Cookie",
|
"Set-Cookie",
|
||||||
"X-Auth-Username",
|
"X-Auth-Username",
|
||||||
|
|
Reference in New Issue