craig_gill
3 years agoNovice I
Hello all I have a Helm Template helper function
Hello all
I have a Helm Template helper function that is creating a JSON object that I am using in a Helm chart to template out the px-pure-secret from my values file:
```{{/*
Template flashblade secret
*/}}
{{- define "sd_portworx.flashbladeSecret" -}}
{{- with .Values.flashblade }}
{{- printf "{\"FlashBlades\": [{\"MgmtEndPoint\": \"%s\", \"APIToken\": \"%s\", \"NFSEndPoint\": \"%s\"}]}" .managementEndpoint .apiToken .nfsEndpoint | b64enc }}
{{- end }}
{{- end }}```
I can really simply add a function to template out the flasharraySecret from values as well:
```flasharray:
managementEndpoint: "my_array"
apiToken: "my_token"```
Is there any way to have helm concat those two templates together and have it be a valid json?