diff --git a/authentik/api/v2/config.py b/authentik/api/v2/config.py index dd9005dc9..0641d41f7 100644 --- a/authentik/api/v2/config.py +++ b/authentik/api/v2/config.py @@ -49,7 +49,7 @@ class ConfigView(APIView): caps.append(Capabilities.CAN_GEO_IP) if SERVICE_HOST_ENV_NAME in environ: # Running in k8s, only s3 backup is supported - if CONFIG.y_bool("postgresql.s3_backup"): + if CONFIG.y("postgresql.s3_backup"): caps.append(Capabilities.CAN_BACKUP) else: # Running in compose, backup is always supported diff --git a/authentik/root/settings.py b/authentik/root/settings.py index 11f0dc90e..cca63a915 100644 --- a/authentik/root/settings.py +++ b/authentik/root/settings.py @@ -20,6 +20,7 @@ from time import time import structlog from celery.schedules import crontab +from kubernetes.config.incluster_config import SERVICE_HOST_ENV_NAME from sentry_sdk import init as sentry_init from sentry_sdk.api import set_tag from sentry_sdk.integrations.celery import CeleryIntegration @@ -396,7 +397,7 @@ if _ERROR_REPORTING: if build_hash == "": build_hash = "tagged" set_tag("authentik.build_hash", build_hash) - set_tag("authentik.env", "kubernetes" if "KUBERNETES_PORT" in os.environ else "compose") + set_tag("authentik.env", "kubernetes" if SERVICE_HOST_ENV_NAME in os.environ else "compose") set_tag("authentik.component", "backend") j_print( "Error reporting is enabled",