(charmed-osm) Add auth to prometheus and update kafka/zk
[osm/devops.git] / installers / charm / prometheus / src / charm.py
index 40c4f4e..af39a13 100755 (executable)
@@ -128,7 +128,13 @@ class PrometheusCharm(CharmedOsmBase):
         )
 
     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"