diff --git a/scripts/helmcharts/openreplay/templates/job.yaml b/scripts/helmcharts/openreplay/templates/job.yaml index bd9fe474a..244fd9ea8 100644 --- a/scripts/helmcharts/openreplay/templates/job.yaml +++ b/scripts/helmcharts/openreplay/templates/job.yaml @@ -1,4 +1,10 @@ -{{- if not .Values.skipMigration}} +{{/* +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 := eq .Values.fromVersion .Chart.AppVersion}} +{{- if or (not (or .Values.skipMigration $versionChange)) .Values.forceMigration }} --- apiVersion: v1 kind: ConfigMap