-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
External hostname is not updated if an ingress is added *after* relating a charm to Prometheus #368
Comments
ReproductionAfter relating a charm to traefik, its metrics endpoint is not updated and prometheus reports
Proposal 1Users of MetricsEndpointProvider must be instructed to always set custom refresh events
Proposal 2MetricsEndpointProvider should always observe update-status by default. Proposal 3MetricsEndpointProvider should update relation data every re-init. Proposal 4Roll the responsibility to the user by introducing an Ideas? @dstathis @Abuelodelanada @rbarry82 |
I think proposal #3 is preferable by far. It's idempotent, users don't have to do anything at all, it doesn't depend on |
Tested manually and the combination of:
solves the issue. With which charm did you experience this @simskij ? You may need to update charm code:
|
I saw it with the loki datasource in grafana after deploying it as a bundle. |
If it's a loki datasource issue then perhaps it's not related to prometheus_scrape? Maybe we need to manually call |
Since Loki already uses the property in the constructor, |
My bad, I saw it in Prometheus too, but it seems to have been resolved now. |
Bug Description
See title. If you first relate to Prometheus and then to Traefik, it all works as expected. The other way around, no cigar.
To Reproduce
Environment
Relevant log output
Additional context
We could have used the ingress established/revoked events, but these are unfortunately fired prematurely
The text was updated successfully, but these errors were encountered: