mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/mariadb] Use global registry in secondary and/or metrics images (#12253)
Signed-off-by: Carlos Rodriguez Hernandez <crhernandez@bitnami.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
a6a7495371
commit
7979dd1bce
@@ -1,6 +1,6 @@
|
||||
apiVersion: v1
|
||||
name: mariadb
|
||||
version: 5.9.0
|
||||
version: 5.10.0
|
||||
appVersion: 10.1.38
|
||||
description: Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster.
|
||||
keywords:
|
||||
|
||||
@@ -66,11 +66,24 @@ Also, we can't use a single if because lazy evaluation is not an option
|
||||
{{/*
|
||||
Return the proper metrics image name
|
||||
*/}}
|
||||
{{- define "metrics.image" -}}
|
||||
{{- $registryName := .Values.metrics.image.registry -}}
|
||||
{{- define "mariadb.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 -}}
|
||||
|
||||
{{ template "mariadb.initdbScriptsCM" . }}
|
||||
|
||||
@@ -166,7 +166,7 @@ spec:
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
- name: metrics
|
||||
image: {{ template "metrics.image" . }}
|
||||
image: {{ template "mariadb.metrics.image" . }}
|
||||
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
|
||||
env:
|
||||
- name: MARIADB_ROOT_PASSWORD
|
||||
|
||||
@@ -152,7 +152,7 @@ spec:
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
- name: metrics
|
||||
image: {{ template "metrics.image" . }}
|
||||
image: {{ template "mariadb.metrics.image" . }}
|
||||
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
|
||||
env:
|
||||
- name: MARIADB_MASTER_ROOT_PASSWORD
|
||||
|
||||
Reference in New Issue
Block a user