Allow for having no registry specified (#312)

This commit is contained in:
Faisal Memon
2023-05-25 14:15:46 -07:00
committed by GitHub
parent 1247b68f4d
commit 3cb55dfb4e
+6 -6
View File
@@ -32,9 +32,9 @@
{{- define "spire-lib.registry" }} {{- define "spire-lib.registry" }}
{{- if ne (len (dig "spire" "image" "registry" "" .global)) 0 }} {{- if ne (len (dig "spire" "image" "registry" "" .global)) 0 }}
{{- .global.spire.image.registry }} {{- print .global.spire.image.registry "/"}}
{{- else }} {{- else if ne (len (.image.registry)) 0 }}
{{- .image.registry }} {{- print .image.registry "/"}}
{{- end }} {{- end }}
{{- end }} {{- end }}
@@ -45,11 +45,11 @@
{{- if eq (substr 0 7 $tag) "sha256:" }} {{- if eq (substr 0 7 $tag) "sha256:" }}
{{- printf "%s/%s@%s" $registry $repo $tag }} {{- printf "%s/%s@%s" $registry $repo $tag }}
{{- else if .appVersion }} {{- else if .appVersion }}
{{- printf "%s/%s:%s" $registry $repo (default .appVersion $tag) }} {{- printf "%s%s:%s" $registry $repo (default .appVersion $tag) }}
{{- else if $tag }} {{- else if $tag }}
{{- printf "%s/%s:%s" $registry $repo $tag }} {{- printf "%s%s:%s" $registry $repo $tag }}
{{- else }} {{- else }}
{{- printf "%s/%s" $registry $repo }} {{- printf "%s%s" $registry $repo }}
{{- end }} {{- end }}
{{- end }} {{- end }}