(charmed-osm) Add auth to prometheus and update kafka/zk
- Authentication to prometheus:
- Update prometheus relation to provide auth credentials (user/pass)
- Update grafana datasource to include credentials to prometheus
- Update kafka and zookeeper charms:
- Add support for the charms to talk to the new kafka charm
- Add kafka and zookeeper charms in local bundle
Change-Id: Ifb83769583178f3a2069ae6756aa430ec69eecce
Signed-off-by: David Garcia <david.garcia@canonical.com>
diff --git a/installers/charm/prometheus/src/charm.py b/installers/charm/prometheus/src/charm.py
index 40c4f4e..af39a13 100755
--- a/installers/charm/prometheus/src/charm.py
+++ b/installers/charm/prometheus/src/charm.py
@@ -128,7 +128,13 @@
)
def _publish_prometheus_info(self, event: EventBase) -> NoReturn:
- self.prometheus.publish_info(self.app.name, PORT)
+ config = ConfigModel(**dict(self.config))
+ self.prometheus.publish_info(
+ self.app.name,
+ PORT,
+ user=config.web_config_username,
+ password=config.web_config_password,
+ )
def _on_backup_action(self, event: EventBase) -> NoReturn:
url = f"http://{self.model.app.name}:{PORT}/api/v1/admin/tsdb/snapshot"