canonical / prometheus-k8s-operator

https://charmhub.io/prometheus-k8s
Apache License 2.0
21 stars 35 forks source link

prometheus_scrape docstring mismatch implementation #396

Closed NohaIhab closed 1 year ago

NohaIhab commented 2 years ago

Docstring says *.rule only,

https://github.com/canonical/prometheus-k8s-operator/blob/9aefe04838118936ac8473ebfa690fc21e65e230/lib/charms/prometheus_k8s/v0/prometheus_scrape.py#L258

Code takes both .rule and .rules

https://github.com/canonical/prometheus-k8s-operator/blob/9aefe04838118936ac8473ebfa690fc21e65e230/lib/charms/prometheus_k8s/v0/prometheus_scrape.py#L942

sed-i commented 2 years ago

I wonder if we should add yml and yaml to the list of acceptable file extensions, since the official docs use yml: https://github.com/prometheus/prometheus/blob/main/documentation/examples/prometheus.yml

And it's always nice that editors automatically pick the correct syntax highlighting.