Feature - Support X-Grafana-Org-Id Header #1726
Labels
enhancement
New feature or request
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
Is your feature request related to a problem? Please describe.
On our self-hosted Grafana Enterprise instance, we use Organisations to isolate our clients dashboards and Teams to structure internal teams permissions (viewer/editor) and client teams permissions (mostly viewer).
We want to be able to specify for each dashboard and/or datasource the organisation id where to provision them on our Grafana instance.
Note: we use
grafana-operator
with external grafana configuration (grafana is provisioned using the helm chart, not the operator)Describe the solution you'd like
Allow to pass the X-Grafana-Org-Id header when the operator requests Grafana HTTP API for any resource type e.g. folder, dashboards or datasources.
This could be done in multiple ways:
headers
parameter for all requests in Grafana.spec.clientorgId
parameter in Grafana.spec.external.orgId
parameter per resource e.g. in GrafanaDashboard.specWith the first 2 solutions, we would declare multiple
Grafana
instances with different X-Grafana-Org-Id values and rely onInstanceSelector
inGrafanaDashboard
spec to select the correct instance/orgid url.With the latest, we would have a single
Grafana
resource and rely on the neworgId
parameter inGrafanaDashboard
spec to select the correct organisation.Describe alternatives you've considered
We plan to build a solution using a proxy to set the header attribute depending on the url e.g.
curl -X GET grafana.org-1.example.com/api
=curl -X GET -H "X-Grafana-Org-Id: 1" grafana.example.com
But this feels a bit hackish, a proper build-in solution would be much more simpler.
Additional context
We are aware that Organisations are not a feature Grafana plans to invest in according to https://grafana.com/blog/2022/03/14/how-to-best-organize-your-teams-and-resources-in-grafana/.
However, we pay a licence which allow us to propose a single instance for our team and our client instead of the cumbersome management of multiple instances (that we already have experienced and don't want to go back to).
We do use organisations for the very reasons detailed as limitations here:
The text was updated successfully, but these errors were encountered: