Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Unable to provision dashboards if the grafana instance is defined in a different namespace #1326

Closed
alita1991 opened this issue Nov 29, 2023 · 2 comments
Labels
bug Something isn't working needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@alita1991
Copy link

Describe the bug
I have a use case where I must allow each user to create new Grafana dashboards from different namespaces. While testing the grafana-operator, I noticed that I was not able to create new dashboards if they belonged to a different namespace than the one to which the Grafana CR belongs. Is important to mention that the Grafana CR is configured to point to an external instance, inside of the k8s cluster and the dashboard creation was tested with success in the current namespace of Grafana CR.

Version
v5.4.1

To Reproduce
Steps to reproduce the behavior:

  1. Create a Grafana CR resource in a custom namespace (ex: integration)
  2. Create a Grafana Dashboard in the same namespace as Grafana CR (ex: integration)
  3. Dashboard should be created in Grafana (working)
  4. Create a Grafana Dashboard CR in a different namespace (ex: default)
  5. Dashboard should be created in Grafana (not working)

Expected behavior
Dashboards should be created, even if the Grafana CR is defined in a different namespace.

@alita1991 alita1991 added bug Something isn't working needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 29, 2023
@maciekm
Copy link
Contributor

maciekm commented Dec 1, 2023

have you tried setting: allowCrossNamespaceImport: true?
see https://github.com/grafana-operator/grafana-operator/tree/master/examples/crossnamespace

looks like its required on dashboards, data sources and folders: code

@alita1991
Copy link
Author

Hi @maciekm,

I tested the flag, everything works as expected.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

2 participants