From 115690eee0cd393b41e703e4da8bb28a0e129abd Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Fri, 16 Aug 2024 17:05:29 +0100 Subject: [PATCH] fix(helm): version change check Signed-off-by: rjshrjndrn --- scripts/helmcharts/openreplay/templates/job.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/helmcharts/openreplay/templates/job.yaml b/scripts/helmcharts/openreplay/templates/job.yaml index fd208d5b7..412392eb2 100644 --- a/scripts/helmcharts/openreplay/templates/job.yaml +++ b/scripts/helmcharts/openreplay/templates/job.yaml @@ -2,8 +2,14 @@ Don't have to trigger migration if there is no version change Don't have to trigger migration if skipMigration is set Have to trigger migration if forceMigration is set + +versionChange is true when: + Release.IsUpgrade is false. + Or .Values.deployment.argo is set. + Or Release.IsUpgrade is true and .Values.fromVersion is not equal to .Chart.AppVersion. */}} -{{- $versionChange := (or .Values.deployment.argo (and (not (eq .Values.fromVersion .Chart.AppVersion)) .Release.IsUpgrade)) }} + +{{- $versionChange := (or (not .Release.IsUpgrade) .Values.deployment.argo (and .Release.IsUpgrade (not (eq .Values.fromVersion .Chart.AppVersion)))) }} {{- if or .Values.forceMigration (and (not .Values.skipMigration) $versionChange) }} --- apiVersion: v1