Skip to content

feat(db): support referencing an existing migrations ConfigMap - #211

Open
fkhantsi wants to merge 1 commit into
supabase-community:mainfrom
fkhantsi:feat/db-migration-config-ref
Open

feat(db): support referencing an existing migrations ConfigMap#211
fkhantsi wants to merge 1 commit into
supabase-community:mainfrom
fkhantsi:feat/db-migration-config-ref

Conversation

@fkhantsi

Copy link
Copy Markdown

Add an optional migrationConfigRef value that points the db StatefulSet at an existing ConfigMap of migration scripts. When set, the chart no longer renders its own migrations ConfigMap, mirroring the secret.*.secretRef pattern used elsewhere in the chart.

What kind of change does this PR introduce?

feature

What is the current behavior?

A ConfigMap named $(supabase.db.fullname)-migrations is automatically created, and migration sql is mounted in it. The SQL must be inlined under the Values.yaml file, and using an external .sql file is impossible.

What is the new behavior?

Allows to externalize creation of the ConfigMap storing migrations. This permits users to either upload ConfigMap before the helm chart, or to use Kustomize's configMapGenerator to mount an actual .sql file instead of inlining sql data inside Values.

The change is backwards compatible, and users can still inline migrations if they wish to.

Add an optional `migrationConfigRef` value that points the db StatefulSet
at an existing ConfigMap of migration scripts. When set, the chart no longer
renders its own migrations ConfigMap, mirroring the `secret.*.secretRef`
pattern used elsewhere in the chart.
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