From 3cb55dfb4eb88b6e3048f3355fe204e3ebadfe70 Mon Sep 17 00:00:00 2001 From: Faisal Memon Date: Thu, 25 May 2023 14:15:46 -0700 Subject: [PATCH] Allow for having no registry specified (#312) --- charts/spire/templates/_spire-lib.tpl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/spire/templates/_spire-lib.tpl b/charts/spire/templates/_spire-lib.tpl index eac2298..7fca6ef 100644 --- a/charts/spire/templates/_spire-lib.tpl +++ b/charts/spire/templates/_spire-lib.tpl @@ -32,9 +32,9 @@ {{- define "spire-lib.registry" }} {{- if ne (len (dig "spire" "image" "registry" "" .global)) 0 }} -{{- .global.spire.image.registry }} -{{- else }} -{{- .image.registry }} +{{- print .global.spire.image.registry "/"}} +{{- else if ne (len (.image.registry)) 0 }} +{{- print .image.registry "/"}} {{- end }} {{- end }} @@ -45,11 +45,11 @@ {{- if eq (substr 0 7 $tag) "sha256:" }} {{- printf "%s/%s@%s" $registry $repo $tag }} {{- else if .appVersion }} -{{- printf "%s/%s:%s" $registry $repo (default .appVersion $tag) }} +{{- printf "%s%s:%s" $registry $repo (default .appVersion $tag) }} {{- else if $tag }} -{{- printf "%s/%s:%s" $registry $repo $tag }} +{{- printf "%s%s:%s" $registry $repo $tag }} {{- else }} -{{- printf "%s/%s" $registry $repo }} +{{- printf "%s%s" $registry $repo }} {{- end }} {{- end }}