outpost: only set embedded outpost config on creation
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
665c1aa81b
commit
837fa23af0
|
@ -1,6 +1,4 @@
|
||||||
"""Outpost managed objects"""
|
"""Outpost managed objects"""
|
||||||
from dataclasses import asdict
|
|
||||||
|
|
||||||
from authentik.managed.manager import EnsureExists, ObjectManager
|
from authentik.managed.manager import EnsureExists, ObjectManager
|
||||||
from authentik.outposts.models import (
|
from authentik.outposts.models import (
|
||||||
DockerServiceConnection,
|
DockerServiceConnection,
|
||||||
|
@ -24,6 +22,12 @@ class OutpostManager(ObjectManager):
|
||||||
outpost.service_connection = KubernetesServiceConnection.objects.first()
|
outpost.service_connection = KubernetesServiceConnection.objects.first()
|
||||||
elif DockerServiceConnection.objects.exists():
|
elif DockerServiceConnection.objects.exists():
|
||||||
outpost.service_connection = DockerServiceConnection.objects.first()
|
outpost.service_connection = DockerServiceConnection.objects.first()
|
||||||
|
outpost.config = OutpostConfig(
|
||||||
|
kubernetes_disabled_components=[
|
||||||
|
"deployment",
|
||||||
|
"secret",
|
||||||
|
]
|
||||||
|
)
|
||||||
outpost.save()
|
outpost.save()
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
@ -33,13 +37,5 @@ class OutpostManager(ObjectManager):
|
||||||
created_callback=outpost_created,
|
created_callback=outpost_created,
|
||||||
name="authentik Embedded Outpost",
|
name="authentik Embedded Outpost",
|
||||||
type=OutpostType.PROXY,
|
type=OutpostType.PROXY,
|
||||||
_config=asdict(
|
|
||||||
OutpostConfig(
|
|
||||||
kubernetes_disabled_components=[
|
|
||||||
"deployment",
|
|
||||||
"secret",
|
|
||||||
],
|
|
||||||
)
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
Reference in New Issue