Charts: [stable/grafana] datasources provisioning not working

Created on 19 Jul 2018  路  7Comments  路  Source: helm/charts

Is this a request for help?: yes

Version of Helm and Kubernetes:
Helm 2.9.1
Kuberenetes 1.10 (running on AWS EKS)

Which chart: stable/grafana

What happened: When trying to use datasources in the values.yaml, grafana fails to start with this message:

t=2018-07-19T18:17:15+0000 lvl=eror msg="Server shutdown" logger=server reason="Service init failed: Datasource provisioning error: read /etc/grafana/provisioning/datasources/datasources.yaml: is a directory"

What you expected to happen:
I expected grafana to start, and have my configured data sources.

How to reproduce it (as minimally and precisely as possible):
My values.yaml contains the following:

datasources:
  - name: argo-test-soh
    type: influxdb
    access: proxy
    orgId: 1
    url: https://<redacted>.influxcloud.net:8086
    user: <redacted>
    password: "<redacted>"
    database: "argo-test-soh"
    basicAuth: false
    isDefault: false
    readonly: false
  - name: argo-stag-soh
    type: influxdb
    access: proxy
    orgId: 1
    url: https://<redacted>.influxcloud.net:8086
    user: <redacted>
    password: "<redacted>"
    database: "argo-stag-soh"
    basicAuth: false
    isDefault: false
    readonly: false
  - name: argo-prod-soh
    type: influxdb
    access: proxy
    orgId: 1
    url: https://<redacted>.influxcloud.net:8086
    user: <redacted>
    password: "<redacted>"
    database: "argo-prod-soh"
    basicAuth: false
    isDefault: false
    readonly: false

Anything else we need to know:
Instead of using persistent volume, I have grafana configured to use Postgres (hosted by AWS RDS). Before upgrading with these values.yaml, I had manually configured one data source. It was all working before adding in the datasources to the yaml.

lifecyclstale

Most helpful comment

Ah, I entered the datasources in the wrong format. Looking at the the original values.yml, this is the format to use:

datasources:
  datasources.yaml:
    apiVersion: 1
    datasources:
    - name: Prometheus
      type: prometheus
      url: http://prometheus-prometheus-server
      access: proxy
      isDefault: true

All 7 comments

@bentatham values format for datasources as changed, see my comment here: https://github.com/helm/charts/issues/6803#issuecomment-408632824
I think you would find what you need to fix your problem.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

I am also facing this issue. @rekcah78 The documentation still refers to the datasources options and also the templates seem to try to implement this. What do you mean with the format for datasources being changed?

Ah, I entered the datasources in the wrong format. Looking at the the original values.yml, this is the format to use:

datasources:
  datasources.yaml:
    apiVersion: 1
    datasources:
    - name: Prometheus
      type: prometheus
      url: http://prometheus-prometheus-server
      access: proxy
      isDefault: true

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

This issue is being automatically closed due to inactivity.

For anyone else who is struggling with migrating from older format. It's not only the format, but also naming. If you won't call the file "datasources.yaml" it will create a directory and pod will keep crashing.

Was this page helpful?
0 / 5 - 0 ratings