outposts: fix deployments referencing the wrong secret

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-05-06 19:51:14 +02:00
parent d85e0593f1
commit d1296e9cc7

View file

@ -68,7 +68,6 @@ class DeploymentReconciler(KubernetesObjectReconciler[V1Deployment]):
)
)
meta = self.get_object_meta(name=self.name)
secret_name = f"authentik-outpost-{self.controller.outpost.uuid.hex}-api"
image_name = self.controller.get_container_image()
return V1Deployment(
metadata=meta,
@ -88,7 +87,7 @@ class DeploymentReconciler(KubernetesObjectReconciler[V1Deployment]):
name="AUTHENTIK_HOST",
value_from=V1EnvVarSource(
secret_key_ref=V1SecretKeySelector(
name=secret_name,
name=self.name,
key="authentik_host",
)
),
@ -97,7 +96,7 @@ class DeploymentReconciler(KubernetesObjectReconciler[V1Deployment]):
name="AUTHENTIK_TOKEN",
value_from=V1EnvVarSource(
secret_key_ref=V1SecretKeySelector(
name=secret_name,
name=self.name,
key="token",
)
),