diff --git a/.ci/helm/buildChart.js b/.ci/helm/buildChart.js index 4fb9bc0815..58e934bb6e 100755 --- a/.ci/helm/buildChart.js +++ b/.ci/helm/buildChart.js @@ -6,4 +6,8 @@ import { getRequiredEnvVar } from "../lib.js"; const version = getRequiredEnvVar("VERSION"); await $`helm dependency update helm`; -await $`helm package --set global.chartVersion=${version} --version ${version} helm`; + +// replace <> in all files in helm/**/Chart.yaml with the value of `version` +await $`find helm -name Chart.yaml -exec sed -i -e 's/__app_version__/${version}/g' {} +`; + +await $`helm package --version ${version} helm`; diff --git a/helm/charts/admincli/Chart.yaml b/helm/charts/admincli/Chart.yaml index 8133d7af32..54002a6002 100644 --- a/helm/charts/admincli/Chart.yaml +++ b/helm/charts/admincli/Chart.yaml @@ -5,3 +5,5 @@ description: A Helm chart for Kubernetes type: application version: "1.0.0" + +appVersion: "__appVersion__" diff --git a/helm/charts/admincli/templates/deployment.yaml b/helm/charts/admincli/templates/deployment.yaml index f0357cb4d2..03f8b99a57 100644 --- a/helm/charts/admincli/templates/deployment.yaml +++ b/helm/charts/admincli/templates/deployment.yaml @@ -35,7 +35,7 @@ spec: {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} - image: "{{ .Values.image.repository }}:{{- default .Values.global.chartVersion .Values.image.tagOverride }}" + image: "{{ .Values.image.repository }}:{{- default .Chart.AppVersion .Values.image.tagOverride }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: - name: Database__Provider diff --git a/helm/charts/adminui/Chart.yaml b/helm/charts/adminui/Chart.yaml index 43eacd2b5a..76d2c27b25 100644 --- a/helm/charts/adminui/Chart.yaml +++ b/helm/charts/adminui/Chart.yaml @@ -5,3 +5,5 @@ description: A Helm chart for Kubernetes type: application version: "1.0.0" + +appVersion: "__appVersion__" diff --git a/helm/charts/adminui/templates/deployment.yaml b/helm/charts/adminui/templates/deployment.yaml index f39686e8b6..5d847a0209 100644 --- a/helm/charts/adminui/templates/deployment.yaml +++ b/helm/charts/adminui/templates/deployment.yaml @@ -53,7 +53,7 @@ spec: {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} - image: "{{ .Values.image.repository }}:{{- default .Values.global.chartVersion .Values.image.tagOverride }}" + image: "{{ .Values.image.repository }}:{{- default .Chart.AppVersion .Values.image.tagOverride }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http diff --git a/helm/charts/consumerapi/Chart.yaml b/helm/charts/consumerapi/Chart.yaml index 63a752352c..bf0efeb8cf 100644 --- a/helm/charts/consumerapi/Chart.yaml +++ b/helm/charts/consumerapi/Chart.yaml @@ -5,3 +5,5 @@ description: A Helm chart for Kubernetes type: application version: "1.0.0" + +appVersion: "__appVersion__" diff --git a/helm/charts/consumerapi/templates/deployment.yaml b/helm/charts/consumerapi/templates/deployment.yaml index 444433cf88..d3148813dd 100644 --- a/helm/charts/consumerapi/templates/deployment.yaml +++ b/helm/charts/consumerapi/templates/deployment.yaml @@ -53,7 +53,7 @@ spec: {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} - image: "{{ .Values.image.repository }}:{{- default .Values.global.chartVersion .Values.image.tagOverride }}" + image: "{{ .Values.image.repository }}:{{- default .Chart.AppVersion .Values.image.tagOverride }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http diff --git a/helm/charts/eventhandler/Chart.yaml b/helm/charts/eventhandler/Chart.yaml index e35c144114..7230025f17 100644 --- a/helm/charts/eventhandler/Chart.yaml +++ b/helm/charts/eventhandler/Chart.yaml @@ -5,3 +5,5 @@ description: A Helm chart for Kubernetes type: application version: "1.0.0" + +appVersion: "__appVersion__" diff --git a/helm/charts/eventhandler/templates/deployment.yaml b/helm/charts/eventhandler/templates/deployment.yaml index 860344b56b..2ece25396b 100644 --- a/helm/charts/eventhandler/templates/deployment.yaml +++ b/helm/charts/eventhandler/templates/deployment.yaml @@ -39,7 +39,7 @@ spec: {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} - image: "{{ .Values.image.repository }}:{{- default .Values.global.chartVersion .Values.image.tagOverride }}" + image: "{{ .Values.image.repository }}:{{- default .Chart.AppVersion .Values.image.tagOverride }}" imagePullPolicy: {{ .Values.image.pullPolicy }} volumeMounts: - name: settings-override