Skip to content

Commit

Permalink
feat: use external_url in grafana source (#632)
Browse files Browse the repository at this point in the history
* feat: use external_url in grafana source

* add ingress refresh events

* fix typo
  • Loading branch information
lucabello authored Jul 16, 2024
1 parent 6b0d58e commit 76e8081
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,13 @@ def __init__(self, *args):
self.grafana_source_provider = GrafanaSourceProvider(
charm=self,
source_type="prometheus",
source_url=self.internal_url, # https://github.com/canonical/operator/issues/970
refresh_event=self.cert_handler.on.cert_changed,
source_url=self.external_url,
refresh_event=[
self.ingress.on.ready_for_unit,
self.ingress.on.revoked_for_unit,
self.on.update_status,
self.cert_handler.on.cert_changed,
],
extra_fields={"timeInterval": PROMETHEUS_GLOBAL_SCRAPE_INTERVAL},
)

Expand Down

0 comments on commit 76e8081

Please sign in to comment.