-
Notifications
You must be signed in to change notification settings - Fork 399
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
Manage organizations #408
Comments
@siredmar That's correct, the Operator does not yet know about organizations. But that means, it will should also not overwrite ones that you create manually. |
@siredmar Is this something you would like to see the operator support? If so, do you have more information or ideas about how this could be integrated? It looks like if we support organizations we would also have to know about users and possibly add a way of creating users via the Operator. What do you think? |
@pb82, Managing Orgs would be a big plus. We were looking for ways to manage access to our dashboards using LDAP. Ideally, grafana suggests to use Teams for the same. But Teams LDAP sync is an enterprise feature. More details on this issue here - grafana/grafana#12119. Using operator, we could get away from using provisioning for dashboards and use CRDs instead. But as for orgs, we would have to use some kind of prehook-job to hit grafana api and create. If you could provide a CRD for org - that would be awesome. I am also open to raise a PR for the same, would need some help though. |
@bhiravabhatla There is a PR for Grafana implementing Org provisioning: grafana/grafana#30578 This seems like a better approach than implementing it via API in the Operator. Once (if) this PR gets merged, you could mount a ConfigMap to provision your organizations. The API approach would give us the advantage of dynamic Org management (through the Grafana CR). So if you want to pick this up feel free to. We are happy to provide you with help. |
Hi @pb82, Went through the code. As of now controller is utilizing the provisioning provided by grafana for datasources, dashboards etc by creating/updating corresponding configMap. If we would have to implement Org Provisioning with current grafana - only way I see is to use grafana API - That would need grafana being up and running before we provision. This would mean deviating from existing strategy. I guess we could wait for above PR to be merged before implementing this in operator - Thoughts? |
@bhiravabhatla why would the API approach deviate from the existing strategy? The dashboard controller currently already uses the Grafana API and we have a client that you can use: https://github.com/integr8ly/grafana-operator/blob/master/controllers/grafanadashboard/grafana_client.go It needs some extra methods for org management. |
@pb82 - I missed this. Will go through. went through - Yep, I could add more methods the client interface. Does it make sense to take it out grafanadashboard package and have its own package. As it wont be specific to dashboard anymore. |
@bhiravabhatla If we add organizations to the Grafana CR then it makes sense to move that client code out of the dashboard package. It can have it's own package called |
We're happy to accept a PR for this, but its not something on our roadmap at the moment. |
Sorry for late update - I have started working on this, could not find time to finish - will try to find sometime next weekend. Will keep this issue updated |
Since I'm currently thinking about implementing this, I invested some brain power into this. I see two possible ways. Either we add the Org to the Grafana CR or create a new CRD. Adding to Grafana CRPROS
CONS
Creating new CRDPROS
CONS
If anyone got some feedback, please let me know. |
I could not spend time on this at all. Apologies for the same. Thanks @Voigtus for renewing this thread. Happy to see this getting traction. Personally I feel adding it to Grafana CR makes more sense. |
Hi @Voigtus was there a discussion around this in slack? Is it already being worked on or currently an open item for contribution? |
Hi all there are a number of people talking about the need for organizations and there is a few issues around it. I think a good start to get this done is to create a design document around CR one or more CR:s that needs to be created/updated. This could be done as a normal PR and stored under documentation/design_proposal/organization or something like that.
https://grafana.com/docs/grafana/latest/http_api/ We also need to consider how to solve this when the grafana-operator supports multiple instances. When implementing this I don't think it should be a single PR, I would even prefer it being split up in to minor PR:s for a easier overview that way many people can also help out with it. But I would like to see someone take charge of the design proposal so the rest of the community can come with feedback on how the API should look. No I will ping a bunch of people that I know have been interested in this before: @kmarquardsen @siredmar @bhiravabhatla @Voigtus @DeanBrunt I hope that you think this is a good idea and that some feels up for the task. |
So I have tried to think of good design solution on how to implement multi organizational support to a single grafana instance. I'm currently leaning on not supporting multiple organization in a single grafana instance. I have tried to explain my reasoning why and I would love to get your feedback on this: #615 |
Sorry for not providing any update on this issue. Our current feeling is that organizations isn't something that should be used inside grafana. We have spoken some with the grafana team about this topic and they agree and that is why organizations isn't supported in there cloud offering. From our point of view the solution is to use multiple grafana instances. We know that this feature currently isn't supported for the operator and we are currently working hard on version 5 to support multi namespace mutli grafana instances. Sorry for the bad news. |
Hi!
Currently i am facing the problem that i not only need to handle dashboards and data sources, but also organizations.
Is my understanding correct that this operator cannot manage organizations in any way?
Cheers
Armin
The text was updated successfully, but these errors were encountered: