_tplvalues.tpl 391 B

12345678910111213
  1. {{/* vim: set filetype=mustache: */}}
  2. {{/*
  3. Renders a value that contains template.
  4. Usage:
  5. {{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }}
  6. */}}
  7. {{- define "common.tplvalues.render" -}}
  8. {{- if typeIs "string" .value }}
  9. {{- tpl .value .context }}
  10. {{- else }}
  11. {{- tpl (.value | toYaml) .context }}
  12. {{- end }}
  13. {{- end -}}