Skip to content

feat(db): make statefulset serviceName and data subPath configurable - #242

Open
dhcsousa wants to merge 1 commit into
supabase-community:mainfrom
dhcsousa:feat/db-statefulset-servicename-subpath
Open

feat(db): make statefulset serviceName and data subPath configurable#242
dhcsousa wants to merge 1 commit into
supabase-community:mainfrom
dhcsousa:feat/db-statefulset-servicename-subpath

Conversation

@dhcsousa

Copy link
Copy Markdown

What kind of change does this PR introduce?

Feature (opt-in, backward compatible).

What is the current behavior?

Closes #241. The db StatefulSet hardcodes two values: serviceName (always supabase.db.fullname) and the data mount's subPath (always postgres-data). Since a StatefulSet's serviceName is immutable, any existing install whose object carries a different (or empty) value fails helm upgrade with a "field is immutable" error, and volumes provisioned with data at a different location (e.g. the volume root) can't be mounted correctly.

What is the new behavior?

Adds two optional values, both unset by default so the default render is unchanged:

  • deployment.db.serviceName: used verbatim when the key is present (including an explicit "", which some legacy StatefulSets need to reproduce in order to upgrade in place); falls back to supabase.db.fullname when absent.
  • persistence.db.subPath: defaults to postgres-data; setting it to "" mounts the volume root.

Additional context

helm lint passes and the default helm template output is byte-identical to main.

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.

Make db StatefulSet serviceName and data subPath configurable

1 participant