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

Status wrong when allowCrossNamespaceImport is set to false and grafana isntance is deployed in another namespace #1164

Open
NissesSenap opened this issue Jul 13, 2023 · 0 comments
Labels
help wanted Extra attention is needed triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@NissesSenap
Copy link
Collaborator

Describe the bug
The status field will show as matching instances even if you deploy a grafana instance in one namespace and your dashboards in another one, even if grafanadashboards.spec.allowCrossNamespaceImport isn't set.

This makes it really easy to think that your dashboard should be synced, but since the operator won't sync crossnamespace grafanadashboards it's makes it really hard to understand why they don't show up in your grafana instance.

Version
v5.2.0

To Reproduce

  • Follow the instructions in CONTRIBUTING.md how to setup your own Local development using make run.
  • run make run
  • Create a new namespace called test
  • Create a dashboard in test
---
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDashboard
metadata:
  name: custom-folder
spec:
  folder: "test"
  instanceSelector:
    matchLabels:
      dashboards: "grafana"
  json: >
    {
      "id": null,
      "title": "Simple Dashboard",
      "tags": [],
      "style": "dark",
      "timezone": "browser",
      "editable": true,
      "hideControls": false,
      "graphTooltip": 1,
      "panels": [],
      "time": {
        "from": "now-6h",
        "to": "now"
      },
      "timepicker": {
        "time_options": [],
        "refresh_intervals": []
      },
      "templating": {
        "list": []
      },
      "annotations": {
        "list": []
      },
      "refresh": "5s",
      "schemaVersion": 17,
      "version": 0,
      "links": []
    }

Expected behavior
Since I haven't set grafanadashboards.spec.allowCrossNamespaceImport in my dashboard i should get

➜ k get grafanadashboards.grafana.integreatly.org -n test
NAME                                  NO MATCHING INSTANCES   LAST RESYNC   AGE
custom folder                              true                                      2m36s         2m36s

Instead, I get

➜ k get grafanadashboards.grafana.integreatly.org -n test
NAME                                  NO MATCHING INSTANCES   LAST RESYNC   AGE
custom-folder                                                                          2m36s         2m36s

Which means there is a sync.

@NissesSenap NissesSenap added bug Something isn't working needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. triage/accepted Indicates an issue or PR is ready to be actively worked on. help wanted Extra attention is needed and removed needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 13, 2023
Baarsgaard added a commit to Baarsgaard/grafana-operator that referenced this issue Nov 9, 2024
Baarsgaard added a commit to Baarsgaard/grafana-operator that referenced this issue Nov 10, 2024
@theSuess theSuess removed the bug Something isn't working label Feb 19, 2025
@theSuess theSuess changed the title [Bug] Status wrong when allowCrossNamespaceImport is set to false and grafana isntance is deployed in another namespace Status wrong when allowCrossNamespaceImport is set to false and grafana isntance is deployed in another namespace Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

2 participants