helm: don't automount Service token when integration is not enabled, improve k8s detection

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-04-07 16:16:17 +02:00
parent 12b1f53948
commit 4054e6da8c
5 changed files with 10 additions and 6 deletions

View File

@ -39,6 +39,8 @@ class AuthentikOutpostConfig(AppConfig):
KubernetesServiceConnection,
)
# Explicitly check against token filename, as thats
# only present when the integration is enabled
if Path(SERVICE_TOKEN_FILENAME).exists():
LOGGER.debug("Detected in-cluster Kubernetes Config")
if not KubernetesServiceConnection.objects.filter(local=True).exists():