I have a need to create configmap in Helm from multiple files (json,.js etc).I am not getting any proper lead. Can somebody please help how to start. Thankyou
I have created a directory outside the template in Helm Chart and saved all my files(3json and 1 .js file)inside the directory called Files and then inside the template folder I have deployment and conifigmap.yaml file. My config.yaml files looks like below:
apiVersion: v1kind: ConfigMapmetadata: name: m-configmap-{{ .Release.Name }} namespace: {{ .Release.Namespace }} labels: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: {{ .Release.Name }} heritage: {{ .Release.Service }}data: config.json: |- {{ .Files.Get "bp.json" | indent 4 }} {{ .Files.Get "cona.json" | indent 4 }} {{ .Files.Get "conb.js" | indent 4 }} {{ .Files.Get "service.json" | indent 4 }}
while trying to check through the command: It simply does not return any value. What am I doing wrong?
helm template master --debug
outputs:
---# Source: master/templates/configmap.yamlapiVersion: v1kind: ConfigMapmetadata: name: master-configmap-release-name namespace: xyz labels: chart: "master-0.1.0" release: release-name heritage: Helmdata: config.json: |----