Prechádzať zdrojové kódy

Helm: Add `global.imageRegistry` (#3451)

Now if this chart is used as a subchart, the image registry will be taken from `global.imageRegistry` (if it exists).

Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
Co-authored-by: Roman Zabaluev <rzabaluev@provectus.com>
Yarden Shoham 2 rokov pred
rodič
commit
334ba3df99

+ 1 - 1
charts/kafka-ui/Chart.yaml

@@ -2,6 +2,6 @@ apiVersion: v2
 name: kafka-ui
 description: A Helm chart for kafka-UI
 type: application
-version: 0.5.3
+version: 0.5.4
 appVersion: v0.5.0
 icon: https://github.com/provectus/kafka-ui/raw/master/documentation/images/kafka-ui-logo.png

+ 5 - 0
charts/kafka-ui/templates/_helpers.tpl

@@ -68,6 +68,11 @@ This allows us to check if the registry of the image is specified or not.
 */}}
 {{- define "kafka-ui.imageName" -}}
 {{- $registryName := .Values.image.registry -}}
+{{- if .Values.global }}
+    {{- if .Values.global.imageRegistry }}
+     {{- $registryName = .Values.global.imageRegistry -}}
+    {{- end -}}
+{{- end -}}
 {{- $repository := .Values.image.repository -}}
 {{- $tag := .Values.image.tag | default .Chart.AppVersion -}}
 {{- if $registryName }}