chore(helm): force upgrade frontend

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
rjshrjndrn 2022-03-03 14:40:23 +01:00
parent c75aa5b2e5
commit 50a7283dae
3 changed files with 12 additions and 1 deletions

View file

@ -96,7 +96,11 @@ restart() {
helmInstall() {
helm upgrade --install openreplay -n app openreplay -f vars.yaml
[[ FORCE_UPGRADE_FRONTENT -eq 1 ]] && {
helm upgrade --install openreplay -n app openreplay -f vars.yaml --set forceUpgradeFrontend=true
} || {
helm upgrade --install openreplay -n app openreplay -f vars.yaml
}
}
upgrade() {

View file

@ -21,6 +21,11 @@ function migration() {
if [[ $FORCE_MIGRATION == "true" ]]; then
echo "Forcing db migration from $PREVIOUS_APP_VERSION to $CHART_APP_VERSION"
# This is a special case where we force upgrade frontend
elif [[ $UPGRADE_FRONTENT == "true" ]]; then
echo "[WARN] Skipping regular upgrdades. Forcing frontend upgrade."
/bin/bash minio.sh migrate
exit 0
elif [[ $PREVIOUS_APP_VERSION == $CHART_APP_VERSION ]]; then
echo "No application version change. Not upgrading."
exit 0

View file

@ -80,6 +80,8 @@ spec:
env:
- name: FORCE_MIGRATION
value: "{{ .Values.forceMigration }}"
- name: UPGRADE_FRONTENT
value: "{{ .Values.forceUpgradeFrontend }}"
- name: PREVIOUS_APP_VERSION
value: "{{ .Values.fromVersion }}"
- name: CHART_APP_VERSION