feat(argo-workflows): Add helper function to determine image value, minus tag (#1754)

We have a situation where we want to exclude the registry so that images can
be pulled from in-network mirrors. Currently when you exclude the registry,
you get stuck with a prefixing forward slash.

Had to keep the tags in the manifest files because helm template requires
a colon in the image value.  Otherwise I'd move it into the helper function.

image entries changed: server, controller, executor

Signed-off-by: jmeridth <jmeridth@gmail.com>

Signed-off-by: jmeridth <jmeridth@gmail.com>
This commit is contained in:
Jason Meridth 2023-01-09 18:03:26 -06:00 committed by GitHub
parent 45861fadb7
commit 7992b5d04b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 5 deletions

View file

@ -142,3 +142,14 @@ Return the default Argo Workflows app version
{{- define "argo-workflows.defaultTag" -}}
{{- default .Chart.AppVersion .Values.images.tag }}
{{- end -}}
{{/*
Return full image name including or excluding registry based on existence
*/}}
{{- define "argo-workflows.image" -}}
{{- if and .image.registry .image.repository -}}
{{ .image.registry }}/{{ .image.repository }}
{{- else -}}
{{ .image.repository }}
{{- end -}}
{{- end -}}