From 0436eabb51a0f5c1e72ec6131a9e41196df3ded9 Mon Sep 17 00:00:00 2001 From: Aleksandr Cupacenko Date: Wed, 20 Nov 2024 12:45:25 +0200 Subject: [PATCH] simplify image tag assignment (#558) Co-authored-by: Aleksandr Cupacenko --- charts/helm-dashboard/templates/_helpers.tpl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/charts/helm-dashboard/templates/_helpers.tpl b/charts/helm-dashboard/templates/_helpers.tpl index 2d479978..1cb76764 100644 --- a/charts/helm-dashboard/templates/_helpers.tpl +++ b/charts/helm-dashboard/templates/_helpers.tpl @@ -74,10 +74,7 @@ Return the proper image name */}} {{- define "helm-dashboard.image" -}} {{- $image := .Values.image -}} -{{- $tag := .Chart.AppVersion -}} -{{- if $image.tag -}} -{{- $tag = $image.tag -}} -{{- end -}} +{{- $tag := default .Chart.AppVersion $image.tag -}} {{- $_ := set $image "tag" $tag -}} {{ include "common.images.image" (dict "imageRoot" $_ "global" .Values.global) }} {{- end -}}