Set Prometheus version in datasource YAML configuration not working

I’m trying to install Grafana (version v9.4.7) in Kubernetes with the Grafana Helm chart.

I have setup the Prometheus datasource in the Helm chart values:

datasources:
  datasources.yaml:
    apiVersion: 1
    datasources:
      - name: Prometheus
        type: prometheus
        url: http://prometheus:9090
        access: proxy
        jsonData:
          timeout: 120
          queryTimeout: 2m
          httpMethod: GET
          manageAlerts: true
          prometheusType: Prometheus
          prometheusVersion: "> 2.40.x"

The problem is that prometheusVersion variable (found in documentation here) does not set the Prometheus version:

image

And when provisioned with the Helm chart all changes to the datasource are gone after pod restart.

Is it not possible to set the Prometheus version in provision YAML configuration or am I doing something wrong?

I am having the same issue. Did you manage to solve how to set the prometheusVersion parametre in the YAML file? Right now, the equivalent would be '> 2.50.x' with Grafana 3.2.0.

I have also tried with any other values and it is not working.

Found it by checking the data_source table in the PostgreSQL database. I saw the value 2.50.1 inside the json_data field. Changed the YAML file to this and it worked:

datasources:
  - name: prometheus
    jsonData:
      prometheusVersion: "2.50.1"

I only described the relevant parts.