From 7bbfe76f68ad72581d00b1f155a18c849de16cb4 Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Sat, 25 Apr 2020 22:10:14 +0200 Subject: [PATCH] funkwhale: Use app version as image tag --- charts/funkwhale/Chart.yaml | 2 +- charts/funkwhale/templates/_helpers.tpl | 7 +++++++ charts/funkwhale/templates/deployment-celerybeat.yaml | 2 +- charts/funkwhale/templates/deployment-celeryworker.yaml | 2 +- charts/funkwhale/templates/deployment.yaml | 2 +- charts/funkwhale/values.yaml | 2 +- 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/charts/funkwhale/Chart.yaml b/charts/funkwhale/Chart.yaml index 1b01dc9..e8b3bd3 100644 --- a/charts/funkwhale/Chart.yaml +++ b/charts/funkwhale/Chart.yaml @@ -4,4 +4,4 @@ appVersion: "0.21" description: A social platform to enjoy and share music icon: https://funkwhale.audio/favicon.png name: funkwhale -version: 0.3.1 +version: 0.3.2 diff --git a/charts/funkwhale/templates/_helpers.tpl b/charts/funkwhale/templates/_helpers.tpl index 823c721..d9c8384 100644 --- a/charts/funkwhale/templates/_helpers.tpl +++ b/charts/funkwhale/templates/_helpers.tpl @@ -38,3 +38,10 @@ Create chart name and version as used by the chart label. {{- define "funkwhale.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} + +{{/* +Create the correct image tag name +*/}} +{{- define "funkwhale.imageTag" -}} +{{- .Values.image.tag | default .Chart.AppVersion -}} +{{- end -}} diff --git a/charts/funkwhale/templates/deployment-celerybeat.yaml b/charts/funkwhale/templates/deployment-celerybeat.yaml index bdac600..66e7b1c 100644 --- a/charts/funkwhale/templates/deployment-celerybeat.yaml +++ b/charts/funkwhale/templates/deployment-celerybeat.yaml @@ -25,7 +25,7 @@ spec: spec: containers: - name: celery-beat - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + image: "{{ .Values.image.repository }}:{{ include "funkwhale.imageTag" . }}" imagePullPolicy: {{ .Values.image.pullPolicy }} command: - sh diff --git a/charts/funkwhale/templates/deployment-celeryworker.yaml b/charts/funkwhale/templates/deployment-celeryworker.yaml index fa828ec..b053c13 100644 --- a/charts/funkwhale/templates/deployment-celeryworker.yaml +++ b/charts/funkwhale/templates/deployment-celeryworker.yaml @@ -25,7 +25,7 @@ spec: spec: containers: - name: worker - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + image: "{{ .Values.image.repository }}:{{ include "funkwhale.imageTag" . }}" imagePullPolicy: {{ .Values.image.pullPolicy }} command: - sh diff --git a/charts/funkwhale/templates/deployment.yaml b/charts/funkwhale/templates/deployment.yaml index 51c8e04..d8b4b33 100644 --- a/charts/funkwhale/templates/deployment.yaml +++ b/charts/funkwhale/templates/deployment.yaml @@ -25,7 +25,7 @@ spec: spec: containers: - name: funkwhale - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + image: "{{ .Values.image.repository }}:{{ include "funkwhale.imageTag" . }}" imagePullPolicy: {{ .Values.image.pullPolicy }} command: - sh diff --git a/charts/funkwhale/values.yaml b/charts/funkwhale/values.yaml index 9f09cf2..28a5509 100644 --- a/charts/funkwhale/values.yaml +++ b/charts/funkwhale/values.yaml @@ -4,7 +4,7 @@ --- image: repository: funkwhale/funkwhale - tag: 0.21 + # tag: pullPolicy: IfNotPresent nameOverride: ""