feat(tenants): isPlatformTenant flag replaces PLATFORM_TENANT_SLUG
ci / changes (push) Successful in 4s
ci / tc_portal (push) Has been skipped
ci / tc_booking (push) Has been skipped
ci / tc_website (push) Has been skipped
ci / tc_platform_api (push) Successful in 22s
ci / tc_operator (push) Successful in 22s
ci / build_portal (push) Has been skipped
ci / build_booking (push) Has been skipped
ci / build_operator (push) Successful in 30s
ci / test_platform_api (push) Successful in 34s
ci / build_platform_api (push) Successful in 15s
ci / deploy (push) Successful in 42s

Identifying the company tenant by slug in env was fragile — every
purge/recreate changed the slug (or id) and the apex guard chased reality
through three config flips in one day. The identity now lives ON the
tenant document: isPlatformTenant, operator-set from the tenant page
(single holder — setting it clears the flag everywhere else), guarded so
tenant admins can't set it on themselves through the shared PATCH route.
The dezky.eu apex guard reads the flag; PLATFORM_TENANT_SLUG is gone.
Dev seed flags its seeded tenant. config-rev 5 rolls platform-api.
This commit is contained in:
Ronni Baslund
2026-06-10 21:47:27 +02:00
parent eefe1b3ec3
commit 83214eb379
12 changed files with 93 additions and 31 deletions
@@ -19,11 +19,10 @@ data:
STALWART_ADMIN_USER: "admin@dezky.eu"
STALWART_PROVISIONING_ENABLED: "true"
# Base for per-tenant service mail domains ({slug}.dezky.eu) AND the
# reserved namespace for customer domains: only the company's own tenant
# (PLATFORM_TENANT_SLUG) may claim the apex; nothing under it can be added
# as a customer domain.
# reserved namespace for customer domains: only the tenant flagged
# isPlatformTenant (operator-set on the tenant page) may claim the apex;
# nothing under it can be added as a customer domain.
PLATFORM_TENANT_DOMAIN: "dezky.eu"
PLATFORM_TENANT_SLUG: "dezky-aps"
# No auto-seeded tenants in production — the dezky company tenant is
# created and owned through the operator like any other.
SEED_ENABLED: "false"
@@ -21,7 +21,7 @@ spec:
annotations:
# Bump to force a rolling restart when only the ConfigMap changed —
# pods read it as env, which is only resolved at container start.
dezky.eu/config-rev: "4"
dezky.eu/config-rev: "5"
spec:
containers:
- name: platform-api