Unable to update existing datasources

  • What Grafana version and what operating system are you using?
    V11.0

  • What are you trying to achieve?
    To update the existing datasources

  • What happened?
    Datasource is not updated

The current setup is via Kubernetes and Helm. We’re using the official Grafana helm chart with version 8.0.2.

The config is used via the datasource field here.

The config is already updated both in Kubernetes resources and the file mounted in the pod of Grafana in /etc/grafana/provisioning/datasources/datasources.yaml

Here are the things that I’ve tried already, but didn’t work

  • I enabled basic auth to reload it via the api/admin/provisioning/datasources/reload endpoint
  • I used datasource sidecar in the helm chart.
  • Manually added the required label in the configmap but encountered an issue due to permission
{"time": "2024-06-17T16:31:50.219788+00:00", "exc_info": "Traceback (most recent call last):\n  File \"/app/resources.py\", line 298, in _update_file\n    return write_data_to_file(dest_folder, filename, file_data, content_type)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/app/helpers.py\", line 93, in write_data_to_file\n    with open(absolute_path, write_type) as f:\n         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nPermissionError: [Errno 13] Permission denied: '/etc/grafana/provisioning/datasources/datasources.yaml'", "taskName": null, "msg": "Error when updating from 'datasources.yaml' into '/etc/grafana/provisioning/datasources'", "level": "ERROR"}

Creating a new datasource with the same config works, but I can’t re-create a new one due to the amount of dashboard that uses this datasource.