Skip to content
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

PrometheusProvider -relation-changed event should store the job_config of the relation #68

Closed
auria opened this issue Jul 1, 2021 · 1 comment

Comments

@auria
Copy link

auria commented Jul 1, 2021

Per https://github.com/canonical/prometheus-operator/blob/76f0d6cc56b78ef70b32b4dc573ff94f330dc08e/lib/charms/prometheus_k8s/v1/prometheus.py#L250, job_configs per target are stored mapped by relation id. The consumer class tries to retrieve specific job configs by rel_id. However, the provider class uses the "rel_id" string as key. Shouldn't the key be the value of the rel_id variable?

@balbirthomas
Copy link
Contributor

Current version of the Prometheus charm library has eliminated the use of stored state all together. All scrape job related information is stored in application relation data of each Consumer charm. Host address of each unit are also gatherred using the unit's relation data. In view of the above I hope it is okay to close this issue. The library is fully documented and an edge channel release is now available, which is still in very active development.

If there is a use case that still needs to be addressed kindly do create another ticket or feel free to reopen this one. Your feedback is always welcome. Thank you for raising issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants