simplify image tag assignment (#558)

Co-authored-by: Aleksandr Cupacenko <alcu@danskebank.lt>
This commit is contained in:
Aleksandr Cupacenko
2024-11-20 12:45:25 +02:00
committed by GitHub
parent fb39d7e324
commit 0436eabb51

View File

@@ -74,10 +74,7 @@ Return the proper image name
*/}} */}}
{{- define "helm-dashboard.image" -}} {{- define "helm-dashboard.image" -}}
{{- $image := .Values.image -}} {{- $image := .Values.image -}}
{{- $tag := .Chart.AppVersion -}} {{- $tag := default .Chart.AppVersion $image.tag -}}
{{- if $image.tag -}}
{{- $tag = $image.tag -}}
{{- end -}}
{{- $_ := set $image "tag" $tag -}} {{- $_ := set $image "tag" $tag -}}
{{ include "common.images.image" (dict "imageRoot" $_ "global" .Values.global) }} {{ include "common.images.image" (dict "imageRoot" $_ "global" .Values.global) }}
{{- end -}} {{- end -}}