This image is used to configure Grafana datasource and dashboards for TiDB cluster. It is used in tidb-docker-compose and tidb-operator.
The JSON files in dashboards are copied from tidb-ansible.
Grafana version prior to v5.0.0 can only use import API to automate datasource and dashboard configuration. So this image is needed to run in docker environment. It runs only once in this environment.
With Grafana v5.x, we can use provisioning feature to statically provision datasources and dashboards. No need to use scripts to configure Grafana.
But currently, the dashboards in tidb-ansible repository are incompatible with Grafana v5.x and cannot be statically provisioned. So this image is still required.
In the future, we can use grafonnet to migrate old dashboards and make dashboard updating reviewable.