I've got a simple json config file with the following format:
{
"applications" : [
{
"appName": "app1"
},
{
"appName": "app2"
}
]
}
And right now I've got 2 helm charts defining the deployments for each application:
apiVersion: v1
kind: Deployment
metadata:
name: app1
# etc, etc, etc
---
apiVersion: v1
kind: Deployment
metadata:
name: app2
# etc, etc, etc
What I'd like to do is load that json config file at installation time and use it to generate the needed Deployment charts, something like this:
# "config" holds the loaded json file
{{- range .Values.config.applications }}
apiVersion: v1
kind: Deployment
metadata:
name: {{ .appName | quote }}
{{- end}}
Is this possible? I've tried a lot of the answers around here, but pretty much all of them have to do with passing a json file to the application via a config map. How can I load a json file in helm and use the values in the chart itself? Note that other applications are consuming this file as well, so I can't just change it to a YAML file or something like that.