Adding dashboard configmaps as part of GitOps repo

  • What Grafana version and what operating system are you using?
    Grafana 9.2.5

  • What are you trying to achieve?
    Trying to add and use either JSON or YAML configmaps to the Helm subchart GitOps repo.
    Not sure how to configure the values.yaml file to provide existing dashboards that we have as separate files. I don’t want to add raw JSON to the values.yaml, it will be huge.

  • How are you trying to achieve it?
    Tried adding configmaps to the subchart templates dir, it didn’t work as Grafana complained about unescaped curly braces and whatnot. Ideally, the developer should chuck in somedashbard-configmap.yaml file to the git repo and dashboard should appear on next ArgoCD sync.

  • What happened?
    Got several diferent errors, depending on the approach I took:

  • invalid character ‘a’ looking for beginning of value

  • function not defined

  • What did you expect to happen?
    Dashboards to load from provided YAML configmaps

I think the biggest issue is the terrible documentation of values.yaml keys as in this particular area, they’re confusing and ambiguous so one needs to try 3-4 different approaches before hopefully succeeding in intention.

Is this that I’m trying to achieve even possible?

Hi @purpleritza,

Welcome to the :grafana: community support forums !!

This is a little bit hard to answer as currently I am not very strong in this domain and will try to help.

I just encountered a very similar post on this topic and it seems to contain an answer as well.

Let us know if this helps. :slight_smile: