-
Notifications
You must be signed in to change notification settings - Fork 415
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
error creating dashboard, expected status 200 but got 404 #136
Comments
The CR seems fine at first glance. I'll give it a try later. |
My issue #137 is certainly related to this one as I see also as status |
When I debug, I observe that the HTTP Client created to access the Graphana instance is not correct. It is defined as such
while in fact, it should be defined using either the kubernetes service + port or ingress route Question: Is it possible to define the address of the service or that the operator calculate it ? |
@cmoulliard The operator uses this strategy to determine the URL: https://github.com/integr8ly/grafana-operator/blob/master/pkg/controller/grafana/grafana_controller.go#L203 So it will first try to use the route/ingress if they exist. If not it will fall back to using the Service (more specifically: the clusterIP of the service). There is also a CR setting Are you running on vanilla Kubernetes or OpenShift? |
Kubernetes with an ingress route |
As the ingress route exists, I will debug this part of the code to see what it happens |
Thanks! Please let me know what you find. Also, you can always try the |
The
|
@cmoulliard On Kubernetes it should find the Ingress however: https://github.com/integr8ly/grafana-operator/blob/master/pkg/controller/grafana/grafana_controller.go#L218 Also, |
I added the parameter
The IP address is correct
Dashboard json = raw format of the req : https://gist.github.com/cmoulliard/bb37cf340376f1fa95a7218bb888ce7f |
What I dont understand is that I can POST using the ingress address
That also works If I do a
BUT that will fail using the IP address as we got also a timeout
Question: How can grafana use the k8s service name (=> grafana-service) and not the IP address ? |
There is a problem with the logic or the way that you collect the ingress hostname. Why ? So, the code will return this IP address by example |
So, ideally, when the Grafana CR includes a
@pb82 WDYT ? |
@cmoulliard sorry for the late response. I think this is a good way forward, relying on the hostname in the CR instead of the one in the Ingress. As for Not sure if I get a chance to try it out this week, so if you want to give it a try please go ahead. I'll try to get to it as soon as possible. |
Correct. this is my fault as I was running the operator from my laptop |
I did a successful test using the following syntax for ingress
|
@cmoulliard @1337andre The suggested fix is included in the v3.1.0 release (thanks @cmoulliard for proposing and testing this)! The only assumption I make is that the ingress hostname will always be Also, would you mind trying of v3.1.0 resolves your issue? |
ingress can take care of that (I mean to send packets to http or https) https://kubernetes.github.io/ingress-nginx/user-guide/tls/#server-side-https-enforcement-through-redirect. So, I dont think that we must add a second option but instead document and log it correctly |
I have http ingress (tls terminates at top-level balancer) and have the same error in v3.1.0
|
@afoninsky Ok, so we probably should not assume always https. As a workaround, I think you can set |
Sorry didn't mention, I have another error using "preferService": |
Can you share the dashboard? |
The message reported by the pod log is not enough and ideally the service, ingress URL should be logged to let the user to understand why controller cannot access the Grafan Admin UI/ |
Shared it higher: #136 (comment) |
@cmoulliard @afoninsky Hi guys, bringing this topic back around, have you seen this behaviour with recent grafana versions? |
no problems with 3.6 LGTM |
Closing as resolved |
Hi,
i tried to import SimpleDashboard (https://github.com/integr8ly/grafana-operator/blob/master/deploy/examples/dashboards/SimpleDashboard.yaml)
I use OLM to install grafana-operator in Version 3.0.2 in eks (k8s-version: v1.14.7-eks-1861c5)
Grafana was installed with auth.generic_oauth
something I do wrong?
greetings
Andre
The text was updated successfully, but these errors were encountered: