Hello All,
Following
The example above works fine and we did some customizations based on our requirements.
We are using helm for its deployment.
Below is the excrept from configmap that we are using…
template {
destination = “/tmp/keyfiledir/keyfile”
contents = <<EOT
{{- with secret “secret/data/product/config” -}}
{{- .Data.data.password -}}
{{- end -}}
EOT
}
Here with helm install we are getting below error:
Error: parse error at (pathtoyaml/configmap-vault-agent.yaml:27): function “secret” not defined.
Probably helm is trying to parse it and failing.Notable is i have used ‘-’ already to minimize the extra space its putting.
Please help me out of this.Want to use it in helm.
Additionally I also want the path with secret-> secret/data/product/config to be dynamic helm-if statements can help but do not know how to merge these two(helm and vault).
There is some solution mentioned online like:
template {
destination = “/tmp/keyfiledir/keyfile”
contents = <<EOT
{{{{- with secret "secret/data/product/config" -}} {{- .Data.data.password -}} {{- end -}}
}}
EOT
}
And this works beautifully …But i want one of the text say ‘product’ to be templatized and dynamic populated by helm based on values.yaml.
secret/data/{{ .Values.solution.namespace }}/config
How to achieve this?