-
Notifications
You must be signed in to change notification settings - Fork 3
Add traefik_route to serve tracing endpoints through ingress if it exists #94
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! However I'd really like to see some tests.
At least a couple of unittests for databag contents and endpoints based on whether there is an ingress relation.
Secondly, wondering if we should be renaming the 'ingress' endpoint to traefik-route
to follow the convention of having endpoints and interfaces similarly named.
Also, if some day we choose to provide this kind of multi-route, hybrid ingress via traefik and upgrade the ingress relation accordingly, we can swap them out without the ingress
name being taken by something that isn't quite ingress.
@PietroPasotti: regarding this part:
I don't mind changing the interface name but I was basing the current approach on that Grafana also uses https://github.com/canonical/grafana-k8s-operator/blob/main/charmcraft.yaml#L54 As it was the only o11y charm that uses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good! a few things that we need to check :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly the provider endpoint api needs a final touch IMHO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one final typing suggestion, then we can go!
Only concern I'm left with is the situation where Traefik has TLS, tempo doesn't: external url will be https, internal one will be http.
Will ingestion work via both?
Once you're convinced this is fine, we're good :)
Co-authored-by: PietroPasotti <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's something wrong with http/https and ingress after all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what an emotional rollercoaster
Issue
Tempo receiver endpoints were not accessible over traefik as they are bound to different ports. Fixes #82
Solution
Use
traefik_route
with changes introduced in traefik-k8s-operator#325 to define ports traefik needs to open.Also fix creating URLs for tracing consumers that use
external_url
- scheme and port were missing from the created url.Context
This change is needed for cross-model traces to work. They cannot access internal endpoints of a different k8s cluster . No traces were also coming from machine models.
Testing Instructions
Run the following bundle and verify endpoints (example, port 3200,
/metrics
, port 4318 (expected prometheus metrics),/v1/traces
(expected HTTP code 405)) are accessible on traefik's external IP.Release Notes