Fix Bug 2204 - Grafana Charm is failing to be deployed in Charmed OSM Master 50/13250/2
authorGuillermo Calvino <guillermo.calvino@canonical.com>
Mon, 12 Dec 2022 16:17:49 +0000 (17:17 +0100)
committerbeierlm <mark.beierl@canonical.com>
Mon, 8 May 2023 18:32:51 +0000 (20:32 +0200)
Change-Id: Ia79845f41b642d223d8b501a87a61bdb99db9ab3
Signed-off-by: Guillermo Calvino <guillermo.calvino@canonical.com>
(cherry picked from commit ee303f97b9afe276076f56220d73c6382aa65c48)

installers/charm/grafana/src/charm.py

index dc4dfd9..caa0277 100755 (executable)
@@ -209,6 +209,8 @@ class GrafanaCharm(CharmedOsmBase):
             {
                 "admin-password": admin_initial_password,
                 "mysql-url": mysql_config.mysql_uri or self.mysql_client.get_uri(),
+                "prometheus-user": self.prometheus_client.user,
+                "prometheus-password": self.prometheus_client.password,
             },
         )
 
@@ -257,8 +259,8 @@ class GrafanaCharm(CharmedOsmBase):
             envs={
                 "GF_SECURITY_ADMIN_PASSWORD": "admin-password",
                 "GF_DATABASE_URL": "mysql-url",
-                "PROMETHEUS_USER": self.prometheus_client.user,
-                "PROMETHEUS_PASSWORD": self.prometheus_client.password,
+                "PROMETHEUS_USER": "prometheus-user",
+                "PROMETHEUS_PASSWORD": "prometheus-password",
             },
         )
         container = container_builder.build()