grafana / grafana-infinity-datasource

CSV, JSON, GraphQL, XML and HTML datasource for grafana.
https://grafana.com/docs/plugins/yesoreyeram-infinity-datasource
Apache License 2.0
765 stars 103 forks source link

[Bug] Can't provision inifinity datasource #945

Closed KevinDW-Fluxys closed 3 months ago

KevinDW-Fluxys commented 3 months ago

Describe the bug

When trying to provision an infinity datasource through the grafana operator with a GrafanaDatasource CRD, I get a 400 error without further info.

status:
  lastMessage: '[POST /datasources] addDataSource (status 400): {}'

Steps to reproduce

Add a simple datasource through the grafana operator, for example:

apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDatasource
metadata:
  name: ds-test
  namespace: test
spec:
  allowCrossNamespaceImport: true
  instanceSelector:
    matchLabels:
      dashboards: grafana
  datasource:
    name: "yesoreyeram-infinity-datasource"
    type: "yesoreyeram-infinity-datasource"
    url: ""
    basicAuth: false
    basicAuthUser: ""
    jsonData:
      global_queries: []

Version Details:

Additional context

I have tried with multiple combinations of parameters, the example given above is the most simplistic (the one you get when clicking the Provisioning Script button on a new datasource.

KevinDW-Fluxys commented 3 months ago

For anyone else having this issue: i found in my grafana logs that i had an error about a missing access property.

After adding access: proxy to the spec of my datasource it worked. If this is not something related to my environment alone, it should probably be added in the provision script.