diff --git a/stable/phabricator/Chart.yaml b/stable/phabricator/Chart.yaml index b929016ba4..dd9fa4d413 100644 --- a/stable/phabricator/Chart.yaml +++ b/stable/phabricator/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: phabricator -version: 4.1.0 +version: 4.2.0 appVersion: 2019.10.0 description: Collection of open source web applications that help software companies build better software. keywords: diff --git a/stable/phabricator/templates/_helpers.tpl b/stable/phabricator/templates/_helpers.tpl index 54a718aaab..2c9d214c9f 100644 --- a/stable/phabricator/templates/_helpers.tpl +++ b/stable/phabricator/templates/_helpers.tpl @@ -70,11 +70,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 "phabricator.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/phabricator/templates/deployment.yaml b/stable/phabricator/templates/deployment.yaml index 9939e09010..84ace050d2 100644 --- a/stable/phabricator/templates/deployment.yaml +++ b/stable/phabricator/templates/deployment.yaml @@ -131,7 +131,7 @@ spec: mountPath: /bitnami/apache {{- if .Values.metrics.enabled }} - name: metrics - image: {{ template "metrics.image" . }} + image: {{ template "phabricator.metrics.image" . }} imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} command: [ '/bin/apache_exporter', '-scrape_uri', 'http://status.localhost:80/server-status/?auto'] ports: