diff --git a/stable/joomla/Chart.yaml b/stable/joomla/Chart.yaml index b3d192cda3..33a1efb90e 100644 --- a/stable/joomla/Chart.yaml +++ b/stable/joomla/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: joomla -version: 4.1.1 +version: 4.2.0 appVersion: 3.9.4 description: PHP content management system (CMS) for publishing web content keywords: diff --git a/stable/joomla/templates/_helpers.tpl b/stable/joomla/templates/_helpers.tpl index 3a82b01c58..9862ea7029 100644 --- a/stable/joomla/templates/_helpers.tpl +++ b/stable/joomla/templates/_helpers.tpl @@ -56,11 +56,24 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this {{/* Return the proper image name (for the metrics image) */}} -{{- define "metrics.image" -}} -{{- $registryName := .Values.metrics.image.registry -}} +{{- define "joomla.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/joomla/templates/deployment.yaml b/stable/joomla/templates/deployment.yaml index 06a37cdb7c..b75116083a 100644 --- a/stable/joomla/templates/deployment.yaml +++ b/stable/joomla/templates/deployment.yaml @@ -139,7 +139,7 @@ spec: mountPath: /bitnami/apache {{- if .Values.metrics.enabled }} - name: metrics - image: {{ template "metrics.image" . }} + image: {{ template "joomla.metrics.image" . }} imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} command: [ '/bin/apache_exporter', '-scrape_uri', 'http://status.localhost:80/server-status/?auto'] ports: