grafana-operator icon indicating copy to clipboard operation
grafana-operator copied to clipboard

[Bug] GrafanaDatasource not visible in Grafana

Open haf-tech opened this issue 1 year ago • 0 comments

Describe the bug Created a GrafanaDatasource which is not visible in the Grafana UI/Dashboard. Is the expectation wrong, that created datasources via GrafanaDatasource CR are visible and listed in Grafana UI / Dashboard?

Version v5.8.0

To Reproduce Steps to reproduce the behavior:

  1. Create a GrafanaDatasource
  2. see that the object gets a uid in status
  3. Open Grafana > Connections > Data source and see if this listed

(even waiting various minutes)

apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDatasource
metadata:
  name: a-grafana-ds
spec:
  # With this part the GrafanaDatasource will be not processed from the Operator!
  #valuesFrom:
  #  - targetPath: "secureJsonData.httpHeaderValue1"
  #    valueFrom:
  #      secretKeyRef:
  #         name: "grafana-token"
  #         key: "token"
  instanceSelector:
    matchLabels:
      dashboards: "grafana"
  allowCrossNamespaceImport: true
  datasource:
    name: a-grafana-ds
    type: prometheus
    access: proxy
    database: prometheus
    isDefault: true
    jsonData:
      timeInterval: 5s
      tlsSkipVerify: true
      httpHeaderName1: "Authorization"    
    url: https://thanos-querier.openshift-monitoring.svc.cluster.local:9091
    secureJsonData:
      # this does not work, 
      #"httpHeaderValue1": "Bearer ${token}"
      "httpHeaderValue1": "Bearer abcd....the direct jwt token"
    

Expected behavior GrafanaDashboard visible in Grafana and usable in Dashboard

Suspect component/Location where the bug might be occurring unknown I see that specific GrafanaDatasourceconfigurations are not "valid" for the Operator, see above snippet with the comments. The jwt token works, configuring via Grafana UI with the jwt, URL etc works.

Screenshots If applicable, add screenshots to help explain your problem.

Runtime (please complete the following information):

  • Grafana Operator Version v5.8.0
  • OpenShift 4.14.27

Additional context n/a

haf-tech avatar Aug 28 '24 17:08 haf-tech