You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Current limitation - the image for argoexec is missing, since it's sent as a parameter in the command in the template, and it's hard to match it with a regex.
# This template prints all values and also sets tags for all images with non-empty repository value, where the tag is empty and should be derived from the appVersion of the subchart.
7
+
ALL_VALUES_TEMPLATE=$(cat <<END
8
+
{{- define "recurse-set-image-tags"}}
9
+
{{- \$map := .Values }}
10
+
{{- \$root := .root }}
11
+
{{- \$rootKey := .rootKey}}
12
+
{{- range \$key, \$val := \$map -}}
13
+
{{- if eq \$key "image" }}
14
+
{{/* If tag is not provided, check for subchart appVersion*/}}
15
+
{{ if kindOf \$val | eq "map" }}
16
+
{{- if hasKey \$val "tag" }}
17
+
{{/* If tag has no value*/}}
18
+
{{- if and (not \$val.tag) \$val.repository}}
19
+
{{- \$suspectedSubChart := \$rootKey }}
20
+
{{- if hasKey \$root.Subcharts \$suspectedSubChart }}
21
+
{{ \$subchart := get \$root.Subcharts \$suspectedSubChart }}
22
+
{{- \$_ := set \$val "tag" \$subchart.Chart.AppVersion }}
23
+
{{- else if eq \$rootKey "installer" }}
24
+
{{- \$_ := set \$val "tag" \$root.Chart.Version }}
0 commit comments