I am deploying several components which have the same image tag and chart version. I want to keep all those versions in a single file, so either Chart.yaml or values.yaml is the source of truth.
For example, values could look like this:
global:
versions:
myAppVersion: &myAppVersion "123-321"
myApp:
replicaCount: 1
image:
repository: http://docker-repo
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: *myAppVersion
and Chart.yaml:
apiVersion: v2
name: SomeApp
type: application
version: 1.0.0
dependencies:
- name: myApp
version: '{{ index .Values.global.versions "myAppVersion" }}'
repository: '@helm-repo'
However it seems that variables are not allowed in Chart.yaml. Is there any other way to achieve this? Adding the ArgoCD tag because there might be additional limitations.
EDIT: there are several components: myApp1, myApp2, …