1 {{/* vim: set filetype=mustache: */}}
3 Return the proper image name
4 {{ include "common.images.image" ( dict "imageRoot" .Values.path.to.the.image "global" $) }}
6 {{- define "common.images.image" -}}
7 {{- $registryName := .imageRoot.registry -}}
8 {{- $repositoryName := .imageRoot.repository -}}
9 {{- $tag := .imageRoot.tag | toString -}}
11 {{- if .global.imageRegistry }}
12 {{- $registryName = .global.imageRegistry -}}
15 {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
19 Return the proper Docker Image Registry Secret Names
20 {{ include "common.images.pullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" .Values.global) }}
22 {{- define "common.images.pullSecrets" -}}
23 {{- $pullSecrets := list }}
26 {{- range .global.imagePullSecrets -}}
27 {{- $pullSecrets = append $pullSecrets . -}}
32 {{- range .pullSecrets -}}
33 {{- $pullSecrets = append $pullSecrets . -}}
37 {{- if (not (empty $pullSecrets)) }}
39 {{- range $pullSecrets }}