Show a message when user tries to upgrade app with db from a stopped state

This commit is contained in:
Stavros kois
2023-11-06 16:07:34 +02:00
committed by Stavros Kois
parent ee999c9222
commit 07920d9224
2 changed files with 10 additions and 0 deletions

View File

@@ -70,6 +70,11 @@ backupChownMode (optional): Whether to chown the backup directory or
{{- if $ixChartContext.isUpgrade -}}
{{- $enableBackupJob = true -}}
{{- end -}}
{{- if hasKey $ixChartContext "isStopped" -}}
{{- if $ixChartContext.isStopped -}}
{{- fail "Application must be running before upgrade. This is to ensure the database backup will be able to complete." -}}
{{- end -}}
{{- end -}}
{{- else -}}
{{/*
If the key is not present in ixChartContext,

View File

@@ -75,6 +75,11 @@ backupChownMode (optional): Whether to chown the backup directory or
{{- if $ixChartContext.isUpgrade -}}
{{- $enableBackupJob = true -}}
{{- end -}}
{{- if hasKey $ixChartContext "isStopped" -}}
{{- if $ixChartContext.isStopped -}}
{{- fail "Application must be running before upgrade. This is to ensure the database backup will be able to complete." -}}
{{- end -}}
{{- end -}}
{{- else -}}
{{/* If the key is not present in ixChartContext, means we
are outside SCALE (Probably CI), let upgrade job run */}}