camel-k icon indicating copy to clipboard operation
camel-k copied to clipboard

Tracing/Telemetry traits auto discovery cross-namespace

Open gansheer opened this issue 2 years ago • 4 comments

An auto discovery trait option exists in the tracing and telemetry traits to discover automatically any Jaeger compatible service available. This functionality (tracing.auto and telemetry-auto) is a quick shortcut for basic usage:

  • it only looks into the namespace of the integration
  • build the endpoint with 'svc.cluster.local'
  • look for a service containing:
    • a http-c-binary-trft port and the label "app.kubernetes.io/part-of=jaeger,app.kubernetes.io/component=service-collector" for tracing
    • a grpc-otlp port and the label "app.kubernetes.io/part-of=jaeger,app.kubernetes.io/component=service-collector" for telemetry

It then generated the valid endpoint if it found at least one service (on the first found). If the Jaeger service is in another namespace it will not be discovered.

It would be useful to be able to discover a Jaeger service present in another namespace.

I see two ways to do that:

  • search through all namespaces "available" (there are high impacts with the security configurations in the k8s/OCP cluster)
  • provide an option to indicate in which namespace the service can be found like trait.auto-namespace (there are limited impacts the security configurations in the k8s/OCP cluster)

Opening access to any other namespace service for discovery will mean the operator need to be able to call some Kubernetes APIs, at least GET on service Resources on the Jaeger namespace.

Note : tracing has been deprecated in 1.12.x and will most probably be removed in 2.x but it has roughly the same code as telemetry.

gansheer avatar Mar 28 '23 08:03 gansheer

Can we have the same feature in the prometheus trait as well please? 🙏🏻

mertdotcc avatar Mar 28 '23 12:03 mertdotcc

That could be a good idea but I don't know much on the prometheus trait. Please feel free to open an issue on that @mertdotcc to explain what you expect as the trait is really different from the tracing/telemetry ones.

gansheer avatar Mar 28 '23 12:03 gansheer

Will do!

mertdotcc avatar Mar 28 '23 12:03 mertdotcc

This issue has been automatically marked as stale due to 90 days of inactivity. It will be closed if no further activity occurs within 15 days. If you think that’s incorrect or the issue should never stale, please simply write any comment. Thanks for your contributions!

github-actions[bot] avatar Aug 02 '23 00:08 github-actions[bot]