helm-charts/charts/library/common/templates/lib/container/fields/_image.tpl
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 66389dec8b
feat(common): Release 2.0.1 (#193)
2023-10-03 09:24:41 +02:00

15 lines
472 B
Smarty

{{/*
Image used by the container.
*/}}
{{- define "bjw-s.common.lib.container.field.image" -}}
{{- $ctx := .ctx -}}
{{- $rootContext := $ctx.rootContext -}}
{{- $containerObject := $ctx.containerObject -}}
{{- $imageRepo := $containerObject.image.repository -}}
{{- $imageTag := default $rootContext.Chart.AppVersion $containerObject.image.tag -}}
{{- if and $imageRepo $imageTag -}}
{{- printf "%s:%s" $imageRepo $imageTag -}}
{{- end -}}
{{- end -}}