Skip to content

Conversation

@luizfelmach
Copy link
Contributor

Summary

This PR introduces the supabase.db.host and supabase.db.port helper templates to centralize database connection logic across the Helm chart.

With these helpers, services no longer need to implement conditional logic for internal vs external databases individually. All components now consistently consume DB_HOST and DB_PORT from shared helpers, reducing duplication and configuration drift.

The values.yaml file was also updated to better document and support external database configuration via db.external.


What kind of change does this PR introduce?

  • Bug fix
  • New feature
  • Refactor
  • Configuration / Helm chart improvement
  • Documentation update
  • Breaking change

What is the current behavior?

Each service defines its own logic to resolve database connection settings, often relying on:

  • Inline conditionals based on db.enabled
  • Service-specific environment variable overrides
  • Repeated definitions of DB_HOST and DB_PORT

This leads to duplicated logic across templates and makes external database configuration harder to maintain and reason about.


What is the new behavior?

  • Database host and port resolution is centralized via:
    • supabase.db.host
    • supabase.db.port
  • All services now consume DB_HOST and DB_PORT from these shared helpers
  • External databases are explicitly supported and documented using:
    db:
      enabled: false
      external:
        host: mypostgres.example.com
        port: 5432
  • Service-specific conditionals and overrides were removed, simplifying templates and reducing configuration errors

Introduce `supabase.db.host` and `supabase.db.port` helpers to unify
internal vs external database configuration.

All services now consume DB_HOST and DB_PORT from shared helpers,
removing duplicated conditionals and service-specific overrides.
Also updates values.yaml to document and support external DB host/port
via `db.external`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant