helm-charts
helm-charts copied to clipboard
[kube-prometheus-stack] Grafana switching Org adds Port 3000 in URL of Grafana
Describe the bug a clear and concise description of what the bug is.
If have configured multiple Orgs and if I switch between them the Port of Grafana (:3000) gets added into the URL which leads into an browser error of course ("ERR_CONNECTION_REFUSED").
I tried to find something like prometheus.prometheusSpec.externalURL for Grafana but couldn't find it.
How Can I fix this issue?
What's your helm version?
v3.13.3
What's your kubectl version?
v1.28.2
Which chart?
prometheus-community/kube-prometheus-stack
What's the chart version?
55.5.0
What happened?
No response
What you expected to happen?
No response
How to reproduce it?
No response
Enter the changed values of values.yaml?
.... grafana: defaultDashboardsTimezone: Europe/Berlin adminPassword: <PW> ingress: enabled: true ingressClassName: nginx hosts: - sub.domain.tld persistence: type: pvc enabled: true storageClassName: ceph-filesystem accessModes: - ReadWriteMany ...
Enter the command that you execute and failing/misfunctioning.
helm upgrade --install $RELEASE_NAME $REPO_NAME/$RELEASE_NAME --namespace=$NAMESPACE --create-namespace --version=$RELEASE_VERSION -f values.yaml
Anything else we need to know?
No response
The problem should get fixed by setting root_url
in grafana.ini
(Ref.). For example, with ingress host grafana.example.local
and TLS:
grafana:
grafana.ini:
server:
domain: grafana.example.local
root_url: "https://%(domain)s/"
If using HTTP:
grafana:
grafana.ini:
server:
domain: grafana.example.local
root_url: "http://%(domain)s/"
## alternative:
# root_url: "%(protocol)s://%(domain)s/"
The problem should get fixed by setting
root_url
ingrafana.ini
(Ref.). For example, with ingress hostgrafana.example.local
and TLS:grafana: grafana.ini: server: domain: grafana.example.local root_url: "https://%(domain)s/"
Thanks a lot, that one worked. But I wonder why this is needed now. Isn't this a default value?
Edit: Sorry closed this, but would be nice to get an idea why this happened. Will close this after it!
Isn't this a default value?
No, it is not. The default root_url
is set to
%(protocol)s://%(domain)s:%(http_port)s/
protocol
, domain
and http_port
are configuration parameters of the server
section with these defaults. The root URL can also be set via env variable GF_SERVER_ROOT_URL.