grafana / grafana-operator

An operator for Grafana that installs and manages Grafana instances, Dashboards and Datasources through Kubernetes/OpenShift CRs
https://grafana.github.io/grafana-operator/
Apache License 2.0
863 stars 384 forks source link

Specify additional headers for externally managed Grafana #1614

Open Dermah opened 1 month ago

Dermah commented 1 month ago

We host our Grafana instance behind a proxy that requires a few authentication headers, such as:

Client-Id: <CLIENT_ID>
Client-Secret: <CLIENT_SECRET>

We would like to use the grafana-operator, running in a different network, to connect to this Grafana instance and manage it as an external Grafana. However it appears the external spec only allows for usernames, passwords and api keys.

It would be great for us if there was a field on Grafana.spec.external such as additional_headers (as originally proposed in https://github.com/grafana/grafana-operator/issues/402#issuecomment-828798085) that could be populated with arbitrary headers that are used for all requests to the external Grafana.

Perhaps it would also be good to have these headers set from a ConfigMap or Secret

theSuess commented 1 month ago

Thanks for the request! Can you put together an example of how you'd like this to look in the Grafana resource? Just so we don't implement this and then miss your use case :)