Is it possible to change braces in Grafana or Helm?

Viewed 51

Grafana braces {{ }} collide with my Helm chart braces {{ }}.

  1. Is it possible to change braces in Grafana from {{ }} to {% %}?
  2. Is it possible to change braces in Helm from {{ }} to {% %}?
1 Answers

Unfortunately, the most straightforward way to do this is to provide the Grafana template data as a raw string in the Helm template, something like this:

apiVersion: v1
kind: ConfigMap
name: stackoverflow-example
data:
  grafana.template: |-
    {{`{{ your-grafana.data.here }}`}}

In this case, the Helm template will only see the outer pair, and render the rest as an opaque string.

Related