From 742f7ed3467e0ed7eca3a27a67d8bcc00a7dc91c Mon Sep 17 00:00:00 2001 From: offzale Date: Mon, 14 Jan 2019 07:32:40 +0100 Subject: [PATCH] Metrics image registry takes value from global (#10555) Signed-off-by: Enrique --- stable/nats/Chart.yaml | 2 +- stable/nats/templates/_helpers.tpl | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/stable/nats/Chart.yaml b/stable/nats/Chart.yaml index 2310083c05..52e01c44b2 100644 --- a/stable/nats/Chart.yaml +++ b/stable/nats/Chart.yaml @@ -1,5 +1,5 @@ name: nats -version: 2.0.1 +version: 2.0.2 appVersion: 1.3.0 description: An open-source, cloud-native messaging system keywords: diff --git a/stable/nats/templates/_helpers.tpl b/stable/nats/templates/_helpers.tpl index ef93757d98..2609856746 100644 --- a/stable/nats/templates/_helpers.tpl +++ b/stable/nats/templates/_helpers.tpl @@ -69,5 +69,13 @@ Return the proper image name (for the metrics image) {{- $registryName := .Values.metrics.image.registry -}} {{- $repositoryName := .Values.metrics.image.repository -}} {{- $tag := .Values.metrics.image.tag | toString -}} -{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} {{- end -}}