File tree Expand file tree Collapse file tree
tools/deployment/spider-helm/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,18 +74,22 @@ app.kubernetes.io/instance: {{ .Release.Name }}
7474{{- end }}
7575
7676{{/*
77- Creates a container image reference from ` .Values.image.<component>` .
77+ Creates a container image reference from .Values.image.
7878
79- The tag defaults to the chart's appVersion when the component omits it .
79+ Renders repository@digest when "digest" is set; otherwise, requires "tag" and renders repository:tag .
8080
8181@param {object} root Root template context (required)
82- @param {string} component Key under ` .Values.image` (e.g. "storage", "mariadb")
83- @return {string} Full image reference (repository:tag)
82+ @param {string} component Key under .Values.image (e.g., "storage", "mariadb")
83+ @return {string} Full image reference (repository@digest or repository :tag)
8484*/ }}
8585{{- define " spider.imageRef" -}}
8686{{- $img := index .root.Values.image .component -}}
87- {{- $tag := $img .tag | default .root.Chart.AppVersion -}}
87+ {{- if $img .digest -}}
88+ {{- printf " %s @%s " $img .repository $img .digest -}}
89+ {{- else -}}
90+ {{- $tag := required (printf " image.%s .tag is required" .component ) $img .tag -}}
8891{{- printf " %s :%s " $img .repository $tag -}}
92+ {{- end -}}
8993{{- end }}
9094
9195{{/*
You can’t perform that action at this time.
0 commit comments