Skip to content

Commit

Permalink
Remove upgrade warning from harness chart (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
kapilgarg1996 committed Apr 26, 2023
1 parent e46aad3 commit 1dd1ddf
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions src/harness/templates/NOTES.txt
Expand Up @@ -18,32 +18,13 @@
{{ println "" }}
{{- if .Release.IsUpgrade }}

{{- $imageToChart := list (dict "766" "0.2.34") (dict "771" "0.2.88") (dict "776" "0.2.93") (dict "781" "0.3.0") (dict "784" "0.4.0") }}
{{- $imageToChart := list (dict "766" "0.2.34") (dict "771" "0.2.88") (dict "776" "0.2.93") (dict "781" "0.3.0") (dict "784" "0.4.0") (dict "789" "0.5.0") }}

{{- $currentImage := include "harness.harness-manager-image" . }}
{{- $currentChart := "" }}
{{- $currentChartIndex := -1 }}
{{- $updateChartIndex := len $imageToChart }}

{{- if eq $currentImage "0" }}
# Info: Starting chart 0.4.0 and app 784xx, upgrade policies are being formulated. Please upgrade the charts in consecutive minor versions for backward compatibility.
{{- else }}
{{- range $index, $chart := $imageToChart }}
{{- if hasKey $chart $currentImage }}
{{- $currentChartIndex = $index }}
{{- $currentChart = $chart }}
{{- end }}
{{- end }}
{{- if eq $currentChartIndex -1 }}
# Info: Your setup seems to have development images {{ $currentImage }}xx. Starting chart 0.4.0 and app 784xx, upgrade policies are being formulated. Please upgrade the charts in consecutive minor versions for backward compatibility.
{{- else }}
{{- $releaseGap := sub $updateChartIndex $currentChartIndex }}
{{- if gt $releaseGap 2 }}
# Info: Your current chart is {{ get $currentChart $currentImage }} and app {{ $currentImage }}xx. You seem to have skipped intermediate public releases. Starting chart 0.4.0 and app 784xx, upgrade policies are being formulated. Please upgrade the charts in consecutive minor versions for backward compatibility.
{{- end }}
{{- end }}
{{- end }}

{{- if lt $currentImage "771" }}
# Info

Expand Down

0 comments on commit 1dd1ddf

Please sign in to comment.