kiali: Jaeger URL configuration problems
Describe the bug External Jaeger URL is used by Kiali for internal requests, which is causing problem if for example AWS ELB is used for Jaeger (Host DNS will not be resolved from pod). So basically there are two situations possible and both of them has problems.
Situation 1 (jaeger url config is set to Extrernal URL (AWS ELB)):
external_services:
tracing:
namespace: istio-system
service: jaeger-tracing-query
# No ability to set external URL here, because it also will be used for internal calls from Kiali pod, which could be not possible if for example ELB is used.
url: https://numbrs-jaeger-sandbox.cwc.io/jaeger
Situation 2 (Internal Jaeger URL is used):
external_services:
tracing:
namespace: istio-system
service: jaeger-tracing-query
# No ability to set external URL here, because it also will be used for internal calls from Kiali pod, which could be not possible if for example ELB is used.
url: http://jaeger-tracing-query.istio-system.svc.cluster.local:16686/jaeger
So in Situation 2 redirection to Jaeger UI will not work, because Internal cluster URL is used.
Additional information
I have made some additional digging and I think that the fast fix could be pretty simple, this if
block should be deleted: jaeger.go
So internal Jaeger URL will be discovered automatically by service, namespace, port configuration from configs and path (if it configured) from External URL.
The other way to fix this is to use the same strategy as in Grafana integration configurations, where internal and external URL could be declared separately and transparent.
external_services:
grafana:
in_cluster_url: http://grafana.monitoring.svc.cluster.local:3000
url: https://grafana-sandbox.cwc.io
Versions used Kiali: v1.4.0 (also tested with v1.5.0-snapshot.1) Istio: v1.2.2 (with custom ConfigMap for Kiali to support latest Kiali configurations) Kubernetes flavour and version: (e.g. OpenShift Origin 3.9) raw k8s v1.11.7
To Reproduce Steps to reproduce the behavior:
- Set external Jaeger URL that could be accessible from outside the cluster, in our case through AWS ELB (E.g. https://external-jaeger.test.com/jaeger)
- Set
jaeger.namespaceandjaeger.servicefor Internal URL discovery. - Login to Kiali.
- See error and tracing integration is disabled.
If in step one we will set internal URL (E.g http://jaeger-query.istio-system.svc.cluster.local:16686/jaeger) there will not be error in Kiali but redirection to Jaeger will not work (E.g. Click on Distributed Tracing button on UI), which is expected.
Expected behavior Both redirection to Jaeger UI and internal Kiali’s requests to Jaeger api works.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 27 (4 by maintainers)
@AceHack this issue was resolved I think, following this comment: https://github.com/kiali/kiali/issues/1695#issuecomment-553867897 . What config did you do for tracing urls?
With a default install of istio (1.4.3 / demo profile) I guess this should be something like:
Hi @Demonian ,
Thanks for report the issue, kiali use the service parameter that you have in the configuration to fetch traces (Kiali triy autodiscover the service if is empty), we detected that this give problems in some environments like you ask us, we did a patch for the v1.0 to be aligned with grafana like you proposed.
To use the integration in Kiali you should set in the URL the endpoint to Jaeger to the UI not the internal one (http://jaeger-tracing-query.istio-system.svc.cluster.local:16686/jaeger). Please try it with the correct endpoint where you can see the Jaeger UI from your browser.
The problem here is the internal requests with jaeger.
We fixed this in the v1.0 https://github.com/kiali/kiali/pull/1628 Here is the PR to make the changes in master https://github.com/kiali/kiali/pull/1700
Thanks for this issue !!!