You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Turning on enforce_domainhttps://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#enforce_domain forces a redirect even of the localhost API calls done by the sidecars quay.io/kiwigrid/k8s-sidecar . It looks like when quay.io/kiwigrid/k8s-sidecar gets the redirect, it switches from POST to GET, at which point the request fails. Setting reloadURL manually is a workaround.
I also filed grafana/grafana#93773 to try to make enforce_domain NOT redirect localhost (or have an additional option to do this) which would avoid the need to fix this.
Fixing quay.io/kiwigrid/k8s-sidecar to handle redirects is another option.
The text was updated successfully, but these errors were encountered:
I looked into fixing quay.io/kiwigrid/k8s-sidecar but actually I think it's fine. The problem is the grafana server is returning a 301 when it should return a 308. I update the grafana issue grafana/grafana#93773 with more details about this. That means there are 2 alternatives, both described in grafana/grafana#93773
Problem
Turning on
enforce_domain
https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#enforce_domain forces a redirect even of the localhost API calls done by the sidecars quay.io/kiwigrid/k8s-sidecar . It looks like when quay.io/kiwigrid/k8s-sidecar gets the redirect, it switches from POST to GET, at which point the request fails. SettingreloadURL
manually is a workaround.Suggestion
When setting
enforce_domain
, then defaultreloadURL
to useroot_url
https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#root_url instead of localhost. Which will involve some tweaking here:helm-charts/charts/grafana/templates/_pod.tpl
Lines 386 to 387 in 79ab1d5
Alternatives
I also filed grafana/grafana#93773 to try to make
enforce_domain
NOT redirect localhost (or have an additional option to do this) which would avoid the need to fix this.Fixing quay.io/kiwigrid/k8s-sidecar to handle redirects is another option.
The text was updated successfully, but these errors were encountered: