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

[GrafanaDashboard] Use CR's namespace as a default folder name #1146

Closed
weisdd opened this issue Jul 6, 2023 · 2 comments · Fixed by #1147
Closed

[GrafanaDashboard] Use CR's namespace as a default folder name #1146

weisdd opened this issue Jul 6, 2023 · 2 comments · Fixed by #1147
Labels
enhancement New feature or request needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. v5 A v5 specifc issue/feature

Comments

@weisdd
Copy link
Collaborator

weisdd commented Jul 6, 2023

Is your feature request related to a problem? Please describe.
In v4, we used CR's namespace as a default folder name in the dashboard controller.

In v5, we use General (pre-existing folder with id 0), which contradicts the docs:

In a standard scenario, a folder with default settings gets created through a GrafanaDashboard CR. It either matches the Kubernetes namespace a dashboard exist in or spec.folder field of the CR.

Describe the solution you'd like
We should probably move back to the previous behavior to make sure we don't end up unintentionally cluttering General folder.

@weisdd weisdd added enhancement New feature or request needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. v5 A v5 specifc issue/feature labels Jul 6, 2023
@NissesSenap
Copy link
Collaborator

So I spoke to a colleague around this and he had a good point.

It is reasonable that we should follow how grafana is working.
If you import a random dashboard and don't define a folder in the grafana UI the dashboard will be created in the General folder.

I think this is a good point, it also forces our users to perform an active decision where to put the dashboard.

What do you think around that?

@weisdd
Copy link
Collaborator Author

weisdd commented Jul 8, 2023

@NissesSenap Well, I think the previous behaviour worked great for multi-tenant environments. There, the namespace <=> folder match felt natural. Personally, I wouldn't try to match it with Grafana's behaviour.
At the same time, my intention here is only to make sure docs are not misleading, so I don't necessarily advocate for one approach or the other. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. v5 A v5 specifc issue/feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants