From 60c98b5e83ca4597e677ee82f6e3df0893cc8256 Mon Sep 17 00:00:00 2001 From: Tim Campbell Date: Thu, 6 Mar 2025 11:40:22 +0100 Subject: [PATCH] Separate out hooks for db:prepare and db:migrate --- templates/job-db-prepare.yaml | 2 +- values.yaml | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/templates/job-db-prepare.yaml b/templates/job-db-prepare.yaml index 1959cd5..0b6d8ba 100644 --- a/templates/job-db-prepare.yaml +++ b/templates/job-db-prepare.yaml @@ -1,3 +1,3 @@ -{{- if and .Values.mastodon.hooks.dbMigrate.enabled (not .Values.postgresql.enabled) }} +{{- if and .Values.mastodon.hooks.dbPrepare.enabled (not .Values.postgresql.enabled) }} {{- include "mastodon.dbMigrateJob" (merge (dict "prepare" true ) .) }} {{- end }} diff --git a/values.yaml b/values.yaml index 837dae9..1e118ce 100644 --- a/values.yaml +++ b/values.yaml @@ -24,9 +24,12 @@ mastodon: # @ignored email: not@example.com hooks: - # 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). + # Whether to perform DB schema creation on `helm install`. + # Please note that this does not work when using the included database + # (postgresql.enabled=true). + dbPrepare: + enabled: true + # Whether to perform DB migrations on `helm upgrade`. dbMigrate: enabled: true # Upload website assets to S3 before deploying using rclone.