I have to include the client script file as configmap and mount to pod how to create configmap for below structure in values.yaml
app:
server:
client-cli1.sh: |
#!/bin/bash
echo "Hello World"
client-cli2.sh: |
#!/bin/bash
echo "Hello World"
this is configmap file
apiVersion: v1
kind: ConfigMap
metadata:
name: cli-config
data:
{{ range $key, $val:= .Values.app.server }}
{{ $key }}: |
{{ $val }}
{{ end }}
i am getting error "error converting YAML to JSON: yaml: line 14: could not find expected ':'" Note: cant change structure and cant use File function because the build happen somewhere else only values.ymal will be provided.
how to parse this.
Try this:
apiVersion: v1
kind: ConfigMap
metadata:
name: cli-config
data:
{{ toYaml .Values.app.server | indent 2 }}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With