This is what I currently have:
With the basic helm create
comes a values.yaml
file and a template
folder with a deployment.yaml
.
The Deployment
file has been adapted to manage a spring-boot application in a docker image.
Now the values.yaml
contains something like
myApp:
repository: myApp.mycompany.com/demo/my-app-customers
tag: stable
And the deployment.yaml
contains
spec:
template:
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.myApp.repository }}:{{ .Values.myApp.tag }}"
Let's say I have to manage another spring-boot app, really close to what "my-app-customers" is. I thought that I would just have to add another line to values.yaml
, like that:
mySecondApp:
repository: myApp.mycompany.com/demo/my-app-others
tag: stable
But this wouldn't work with deployment.yaml
because it uses .Values.myApp.repository
. Which means that I need to create another file deployment-others.yaml
which uses .Values.mySecondApp.repository
to deploy this second app. So it is not possible to use the same template for differents applications.
- Am I correct or did I miss something ?
- Would there be another way to do this or do I need to copy past similar deployment (and others) file and have one template file per application ?