| I have locally a working POC which can detect if metrics is provisioned and if so create the service specific dashboard.
- The APB uses oc get configmaps so we can check if the metrics grafana-dashboard-configmap exists
- If it exists use oc patch to add a new key to the configmap containing the json definition of the new dashboard
- Grafana automatically detects this new file and loads in the dashboard
If the grafana configmap does not exist we can create a configmap that grafana can later detect and bring in on provisioning. This is functionality which can be added later. The only thing to be careful of is that the json definition is long and difficult to read so testing is paramount. |