diff --git a/stable/phpmyadmin/Chart.yaml b/stable/phpmyadmin/Chart.yaml index a1adb18f77..765b48ed1d 100644 --- a/stable/phpmyadmin/Chart.yaml +++ b/stable/phpmyadmin/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: phpmyadmin -version: 2.1.0 +version: 2.2.0 appVersion: 4.8.5 description: phpMyAdmin is an mysql administration frontend keywords: diff --git a/stable/phpmyadmin/templates/_helpers.tpl b/stable/phpmyadmin/templates/_helpers.tpl index 4f87efbb93..14537cfb12 100644 --- a/stable/phpmyadmin/templates/_helpers.tpl +++ b/stable/phpmyadmin/templates/_helpers.tpl @@ -73,11 +73,24 @@ Also, we can't use a single if because lazy evaluation is not an option {{/* Return the proper image name (for the metrics image) */}} -{{- define "metrics.image" -}} -{{- $registryName := .Values.metrics.image.registry -}} +{{- define "phpmyadmin.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 -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- 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 -}} {{/* diff --git a/stable/phpmyadmin/templates/deployment.yaml b/stable/phpmyadmin/templates/deployment.yaml index 805188ff5d..87e2f4cb6b 100644 --- a/stable/phpmyadmin/templates/deployment.yaml +++ b/stable/phpmyadmin/templates/deployment.yaml @@ -81,7 +81,7 @@ spec: {{ toYaml .Values.resources | indent 12 }} {{- if .Values.metrics.enabled }} - name: metrics - image: {{ template "metrics.image" . }} + image: {{ template "phpmyadmin.metrics.image" . }} imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} command: [ '/bin/apache_exporter', '-scrape_uri', 'http://status.localhost:80/server-status/?auto'] ports: