Instead of removing version, first deprecate version

Deprecating version allows users of the chart to have a migration path

Signed-off-by: Marco Franssen <[email protected]>
This commit is contained in:
Marco Franssen
2023-05-17 20:21:07 +02:00
parent 59e422b9e3
commit d850486478
10 changed files with 57 additions and 15 deletions
+11 -9
View File
@@ -40,13 +40,15 @@
{{- define "spire-lib.image" -}}
{{- $registry := include "spire-lib.registry" . }}
{{- if eq (substr 0 7 .image.tag) "sha256:" -}}
{{- printf "%s/%s@%s" $registry .image.repository .image.tag -}}
{{- else if .appVersion -}}
{{- printf "%s/%s:%s" $registry .image.repository (default .appVersion .image.tag) -}}
{{- else if .image.tag -}}
{{- printf "%s/%s:%s" $registry .image.repository .image.tag -}}
{{- else -}}
{{- printf "%s/%s" $registry .image.repository -}}
{{- end -}}
{{- $repo := .image.repository }}
{{- $tag := (default .image.tag .image.version) | toString }}
{{- if eq (substr 0 7 $tag) "sha256:" }}
{{- printf "%s/%s@%s" $registry $repo $tag }}
{{- else if .appVersion }}
{{- printf "%s/%s:%s" $registry $repo (default .appVersion $tag) }}
{{- else if $tag }}
{{- printf "%s/%s:%s" $registry $repo $tag }}
{{- else }}
{{- printf "%s/%s" $registry $repo }}
{{- end }}
{{- end }}