mirror of
https://github.com/helm/charts.git
synced 2026-08-20 12:57:55 +00:00
[stable/phpmyadmin] Use global registry in secondary and/or metrics images (#12240)
Signed-off-by: Carlos Rodriguez Hernandez <crhernandez@bitnami.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
0f3900a27b
commit
da476d412d
@@ -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:
|
||||
|
||||
@@ -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 -}}
|
||||
|
||||
{{/*
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user