diff --git a/stable/phpbb/Chart.yaml b/stable/phpbb/Chart.yaml index ddb5107112..744e60ec2d 100644 --- a/stable/phpbb/Chart.yaml +++ b/stable/phpbb/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: phpbb -version: 4.1.0 +version: 4.2.0 appVersion: 3.2.5 description: Community forum that supports the notion of users and groups, file attachments, full-text search, notifications and more. keywords: diff --git a/stable/phpbb/templates/_helpers.tpl b/stable/phpbb/templates/_helpers.tpl index 5159316be6..fa1476b58d 100644 --- a/stable/phpbb/templates/_helpers.tpl +++ b/stable/phpbb/templates/_helpers.tpl @@ -56,11 +56,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 "phpbb.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/phpbb/templates/deployment.yaml b/stable/phpbb/templates/deployment.yaml index f9ef2726ee..8b2500e0bc 100644 --- a/stable/phpbb/templates/deployment.yaml +++ b/stable/phpbb/templates/deployment.yaml @@ -132,7 +132,7 @@ spec: mountPath: /bitnami/apache {{- if .Values.metrics.enabled }} - name: metrics - image: {{ template "metrics.image" . }} + image: {{ template "phpbb.metrics.image" . }} imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} command: [ '/bin/apache_exporter', '-scrape_uri', 'http://status.localhost:80/server-status/?auto'] ports: