Skip to content

Commit

Permalink
Helm: Add global.imageRegistry (#3451)
Browse files Browse the repository at this point in the history
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 <[email protected]>
Co-authored-by: Roman Zabaluev <[email protected]>
  • Loading branch information
yardenshoham and Haarolean authored Mar 7, 2023
1 parent 4d20cb6 commit 334ba3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/kafka-ui/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 5 additions & 0 deletions charts/kafka-ui/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 334ba3d

Please sign in to comment.