How to upload dashboards as .json files to kubernetes via helm

@gnutakki good to hear it is working! I was also looking into sidecars but for me this added complexity I didn’t want… very glad to have been of some help anyway.

1 Like

@missswapna / @gnutakki Thanks a lot for the help. I managed to get it working using these values: https://raw.githubusercontent.com/guivin/terraform-helm-example/0.1.0/templates/grafana-values.yaml

Hy, i have followed the same method like the above adding a configmap in the same namespace of the json file but the dashboard is not persisting even though what might be the issue.

Hy, i have followed the same method like the above adding a configmap in the same namespace of the Json file but the dashboard is not persisting even though what might be the issue.

can you help this @missswapna @gnutakki

@vallabhanenisai1999 are you able to give more detail on your configuration and also follow the bullet points I posted above to troubleshoot, then will be happy to help. Thanks!

I’m just wondering how you guys manage to load multiple dashboards into Grafana without exceeding the maximum of 1MiB for the ConfigMap size.

Yes I know, we are able to create multiple ConfigMaps but that’s really not a good idea for us because we have lots of dashboards for different teams. For example, Team Alpha has created 5 different dashboards for their specific microservices and we don’t want to create different ConfigMaps for just one team because of that 1MiB maximum size.

1 Like

is there any way to provision dashboards (and alerts) without using k8s-sidecar at all or bypassing it?

1 Like

Yes we have now hit this limit and so are using the kiwigrid sidecar. Its actually not as complicated as I thought to set up, and it can be used for dashboards AND datasources (my initial concern de to that warning in my earlier post). So we use this now;

grafana:
  sidecar:
    dashboards:
      enabled: true
      searchNamespace: 'grafana'
      provider:
        name: sidecarProvider
        orgid: 1
        folder: ''
        type: file
        disableDelete: false
        allowUiUpdates: true
        foldersFromFilesStructure: false
    datasources:
      enabled: true
      label: "grafana_datasource"
      labelValue: ""

And the dashboards are loaded as individual config maps… the datasources as secrets - they must have the respective labels;

grafana_dashboard: "1"
grafana_datasource: "1"

Cheers.