incubator-devlake-helm-chart
incubator-devlake-helm-chart copied to clipboard
grafana URL localhost issue after upgrading
After upgrading Helm Chart from 0.21.0-beta3 to 1.0.0-beta5 ,
Dashboard link in DevLake UI shows https://www.fulldomain.com/grafana
, but then Grafana redirects to http://localhost/grafana
.
Fixed with new values:
- had to force
https
instead of using internal grafana%(protocol)
- remove
rewrite-target
by disabling theuseDefaultNginx
value.
grafana:
grafana.ini:
server:
domain: www.fulldomain.com
root_url: "https://%(domain)s/grafana"
ingress:
useDefaultNginx: false
@duhow, tried what you suggested I deploy with argocd/helm and use the built-in grafana, getting too many redirects after but forming of url looks ok.
Had to write custom ingress - disabled the one from chart and based on what you did: grafana.ini: server: domain: devlake.example.customer.com root_url: "https://%(domain)s/grafana" useDefaultNginx: false
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: devlake-ingress
namespace: devlake
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/use-forwarded-headers: "true"
spec:
rules:
- host: devlake.example.customer.com
http:
paths:
- path: /grafana
pathType: Prefix
backend:
service:
name: devlake-grafana
port:
number: 80
- path: /
pathType: Prefix
backend:
service:
name: devlake-ui
port:
number: 4000
@s7an-it note that the issue with the built-in Ingress
is that default ingress.useDefaultNginx
adds a rewrite-target
, which in turn makes Grafana path go crazy (as it is removed internally, then Grafana never sees it, but client receives the request)
https://github.com/apache/incubator-devlake-helm-chart/blob/9c9654f2198dfc18c4bf41899f8859248f136ba4/charts/devlake/templates/ingresses.yaml#L39-L41
hi @duhow @s7an-it , thanks for reporting the issue. I have created pr https://github.com/apache/incubator-devlake-helm-chart/pull/278 to remove the rewrite-target part, and i tested by my side, no need to adjust values to below part any more:
Fixed with new values:
- had to force
https
instead of using internal grafana%(protocol)
- remove
rewrite-target
by disabling theuseDefaultNginx
value.grafana: grafana.ini: server: domain: www.fulldomain.com root_url: "https://%(domain)s/grafana" ingress: useDefaultNginx: false
@duhow , are you using nginx ingress? if so, could you help check by your side whether my pr works? we are not using nginx ingress ^^