I have installed the Grafana operator v4.1.1 on my OpenShift 4.9 without problems.
I have created an instance of Grafana v7.5.11 with tls route with success also.
I can connect to the instance using the https url specifed and login with the user/pass specified too
I have tried two methods to create datasource connected to openshift-monitoring prometheus
1- Add user/pass in prometheus-k8s-htpasswd (Install Grafana Operator on OpenShift Container Platform 4 – techbeatly)
The problem with this method is that I can see the secret being patched alright, but it gets reset a minute later to original value with only the internal user defined. So the datasource configured with basic auth fails to connect.
2- By adding cluster-monitoring-view role to the user grafana-serviceaccount and using the bearer token. (Custom Grafana dashboards for Red Hat OpenShift Container Platform 4)
The problem with this method is that if I run a terminal on the grafana pod, it doesn’t run under grafana-serviceaccount but with a generic OCP user like this: 1000720000. So the datasource configured with httpHeader Authorization: ‘Bearer {TOKEN}’ does not connect.
Is there anyone that could give me some insight of what I do wrong or what else I could try?