I have a ConfigMap
where I am including a file in its data attribute and I need to replace several strings from it. But I'm not able to divide it (the "replaces") into several lines so that it doesn't get a giant line. How can I do this?
This is what I don't want:
apiVersion: v1
kind: ConfigMap
data:
{{ (.Files.Glob "myFolder/*.json").AsConfig | indent 2 | replace "var1_enabled" (toString .Values.myVar1.enabled) | replace "var2_enabled" (toString .Values.myVar2.enabled) }}
This is what I'm trying to do:
apiVersion: v1
kind: ConfigMap
data:
{{ (.Files.Glob "myFolder/*.json").AsConfig | indent 2 |
replace "var1_enabled" (toString .Values.myVar1.enabled) |
replace "var2_enabled" (toString .Values.myVar2.enabled) }}
What is the right syntax to do this?