[bitnami/common] Digest/Tag new approach backward compatible (#12029)

Signed-off-by: Carlos Rodriguez Hernandez <carlosrh@vmware.com>

Signed-off-by: Carlos Rodriguez Hernandez <carlosrh@vmware.com>
This commit is contained in:
Carlos Rodríguez Hernández
2022-08-23 22:50:20 +02:00
committed by GitHub
parent 4608e97cb2
commit f1c27dc5d9
2 changed files with 8 additions and 8 deletions

View File

@@ -2,7 +2,7 @@ annotations:
category: Infrastructure
apiVersion: v2
# Please make sure that version and appVersion are always the same.
appVersion: 2.0.0
appVersion: 2.0.1
description: A Library Helm Chart for grouping common logic between bitnami charts. This chart is not deployable by itself.
home: https://github.com/bitnami/charts/tree/master/bitnami/common
icon: https://bitnami.com/downloads/logos/bitnami-mark.png
@@ -20,4 +20,4 @@ sources:
- https://github.com/bitnami/charts
- https://www.bitnami.com/
type: library
version: 2.0.0
version: 2.0.1

View File

@@ -6,18 +6,18 @@ Return the proper image name
{{- define "common.images.image" -}}
{{- $registryName := .imageRoot.registry -}}
{{- $repositoryName := .imageRoot.repository -}}
{{- $tag := .imageRoot.tag | toString -}}
{{- $digest := .imageRoot.digest | toString -}}
{{- $separator := ":" -}}
{{- $termination := .imageRoot.tag | toString -}}
{{- if .global }}
{{- if .global.imageRegistry }}
{{- $registryName = .global.imageRegistry -}}
{{- end -}}
{{- end -}}
{{- if $digest }}
{{- printf "%s/%s@%s" $registryName $repositoryName $digest -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- if .imageRoot.digest }}
{{- $separator = "@" -}}
{{- $termination = .imageRoot.digest | toString -}}
{{- end -}}
{{- printf "%s/%s%s%s" $registryName $repositoryName $separator $termination -}}
{{- end -}}
{{/*