0

I am trying to load multiple json files in with helm into the mockserver from the configmap. For example there are 2 files:

  • files/data1.json
  • files/data2.json According to the docs it should be possible to do this with Global Patterns.

I have tried multiple variations like this: initializerJson.json: |- {{ tpl (.Files.Get "files/**.json") . | printf "%s" | nindent 4 }} I have also tried to merge/attach the json file to eachother with helm but I did not succeed in this task. Here is the basic config we have that works for one file:

{{ if .Values.mockserver.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: mockserver-config
data:
  mockserver.properties: |- {{ .Files.Get "files/mockserver.properties" | printf "%s" | nindent 4 }}
  initializerJson.json: |- {{ tpl (.Files.Get "files/initializerJson.json") . | printf "%s" | nindent 4 }}
{{ end }}

Is it possible to use multiple json file to initialize the data with a mockserver with helm?

0 Answers0