grafana-operator
grafana-operator copied to clipboard
DataSource needs to be managed through grafana API
Hi! When creating a DataSource through OpenShift Advanced Cluster Management, ACM, the datasource does not work. Other components (dashboard, Grafana instance works well). The exact same deployment through an oc apply -k (like what ACM is doing) works perfectly.
We were able to pinpoint the problem. ACM is adding this in the GrafanaDataSource CR metadata:
ownerReferences:
- apiVersion: apps.open-cluster-management.io/v1
kind: Subscription
name: grafana-ramendemo-configuration-subscription-1-local
uid: b0b00735-ac72-4b10-bc6d-a88972feec6a
When the ownerReferences section is removed manually, the operator picks up the DataSource and refreshes the deployment.
Version 3.10.3
To Reproduce Create a datasource with the standard YAML config, and apply it through an ACM deployment.
Expected behavior Datasource is picked up by the operator regarless of owner information.
Runtime (please complete the following information):
- Grafana Operator Version: 3.10.3
- Environment: Openshift 4.8
- Deployment type: Operator deployed, using ACM to create Grafana resources
@guimou can you please try version 4.1.0 (4.1.1) will be released soon instead. Not that I think it will help but we will most likely not backport any fix around this issue to v3 so you will have to upgrade to v4 no matter what.
If it works with dashboard but not with datasource it's probably thanks to that we are using a configmap to insert the datasource.
As mentioned in: https://github.com/grafana-operator/grafana-operator/issues/652 We should ideally start using the http API to interact with data sources
So that would probably solve this issue while remove some technical debt.
This issue hasn't been updated for a while, marking as stale, please respond within the next 7 days to remove this label
@guimou we expect to fix this when switching to the API for data sources.
OK, no worries. Do you want to leave this open til then, or do we close it?
We will keep it open, it's a good way to track it.
Resolved in #919