diff --git a/templates/job-db-migrate.yaml b/templates/job-db-migrate.yaml index da7503a..748420c 100644 --- a/templates/job-db-migrate.yaml +++ b/templates/job-db-migrate.yaml @@ -1 +1,3 @@ +{{- if .Values.mastodon.hooks.dbMigrate.enabled }} {{- include "mastodon.dbMigrateJob" (merge (dict "preDeploy" false ) .) }} +{{- end }} diff --git a/templates/job-db-pre-migrate.yaml b/templates/job-db-pre-migrate.yaml index 2f29716..bae1717 100644 --- a/templates/job-db-pre-migrate.yaml +++ b/templates/job-db-pre-migrate.yaml @@ -1 +1,3 @@ +{{- if .Values.mastodon.hooks.dbMigrate.enabled }} {{- include "mastodon.dbMigrateJob" (merge (dict "preDeploy" true ) .) }} +{{- end }} diff --git a/templates/job-db-prepare.yaml b/templates/job-db-prepare.yaml index 5e9a6a2..1959cd5 100644 --- a/templates/job-db-prepare.yaml +++ b/templates/job-db-prepare.yaml @@ -1,3 +1,3 @@ -{{- if not .Values.postgresql.enabled }} +{{- if and .Values.mastodon.hooks.dbMigrate.enabled (not .Values.postgresql.enabled) }} {{- include "mastodon.dbMigrateJob" (merge (dict "prepare" true ) .) }} {{- end }} diff --git a/values.yaml b/values.yaml index 93d4d9e..837dae9 100644 --- a/values.yaml +++ b/values.yaml @@ -24,7 +24,7 @@ mastodon: # @ignored email: not@example.com hooks: - # Whether to perform DB migrations on `helm install|upgrade`. + # Whether to perform DB preparations & migrations on `helm install|upgrade`. # Please note that initial DB schema creation on `helm install` does not # work when using the included database (postgresql.enabled=true). dbMigrate: