Emergent owns its Supabase services chart
Status: accepted
Date: 2026-11-21
Emergent uses GoTrue for sessions and Supabase Storage for teaching materials and other application objects. Its Bun API currently occupies the Supafull chart’s Functions deployment slot. Disabling PostgREST and Realtime still leaves Services and gateway routes pointing at workloads that are absent. Maintaining a general-purpose Supabase chart in a sibling checkout makes it harder to see which configuration Emergent depends on.
Decision
Section titled “Decision”Maintain a focused Helm chart at infra/charts/supabase for Emergent, using the shared common chart library. Auth and Storage are core services. Studio and Postgres Meta run together in development and can be enabled together elsewhere. The supported workload set excludes PostgREST, Realtime, imgproxy and the upstream Edge Runtime.
Wherever Studio is enabled, the operator’s browser reaches the Studio ClusterIP over WireGuard/Kilo. Studio serves its UI and operator APIs on that private Service. The Studio server calls the Meta ClusterIP directly through STUDIO_PG_META_URL. Studio, Meta and Studio-only APIs are cluster-internal in every environment. Remove the existing gateway route for /pg/ at cutover.
Deploy the Bun API through the Emergent application chart as services.api, with the internal Service name emergent-api. Keep its public /functions/v1 prefix. The cutover includes internal clients, the hosted-agent controller’s permissions, rollout scripts, and any installed cleanup job whose stored command calls supabase-functions.
The cluster infrastructure owns the shared Istio Gateway. The Supabase chart owns the sb hostname’s ListenerSet attachment and TLS configuration, public client-facing Auth and Storage routes, and the supabase-internal DNS alias. The Emergent chart attaches its own HTTPRoute to that listener for the public client-facing paths of the Bun API, content runtime and LRS. Application backend changes consequently belong in the same chart as their routes.
Gateway changes must preserve the workflows provided by current Studio, Auth, Storage and Meta releases. When evaluating credential handling, weigh the operational complexity of installation, upgrades and rotation alongside the reduction in credential exposure.
Preserve the development workflows for running Bun against mounted source and dependencies, overriding private-registry settings, trusting the local CA for Auth callbacks, and accessing Studio locally. Machine-specific settings should allow an individual environment variable to be overridden without copying the entire list.
Significant downtime during the chart transition is acceptable when it reduces implementation effort. This permits a coordinated cutover of application workloads. The persistent database, object store and existing credentials have independent lifecycles.
The services chart consumes external PostgreSQL through a host and credential reference. Finish the chart cutover against the current CNPG database first. The subsequent PostgreSQL 19 work covers the server base image, a matching mounted extension image, and replacement of the Supabase Postgres image in the integration and conformance stacks.
Related decisions
Section titled “Related decisions”ADR-0054 describes how the application chart combines service defaults with individual workload settings. ADR-0055 describes how clients locate the public Supabase origin.