Bug 2193 - Grafana Charm does not get the Prometheus password if it is changed 04/12704/3
authorGuillermo Calvino <guillermo.calvino@canonical.com>
Fri, 18 Nov 2022 12:43:26 +0000 (13:43 +0100)
committerbeierlm <mark.beierl@canonical.com>
Fri, 18 Nov 2022 20:17:12 +0000 (21:17 +0100)
Change-Id: I2d9a72c90a75f85ef10f5985223dda2995d7febd
Signed-off-by: Guillermo Calvino <guillermo.calvino@canonical.com>
installers/charm/grafana/src/charm.py

index 28d28ae..dc4dfd9 100755 (executable)
@@ -245,7 +245,6 @@ class GrafanaCharm(CharmedOsmBase):
             "/etc/grafana/provisioning/datasources/",
             self._build_datasources_files(),
         )
-
         container_builder.add_envs(
             {
                 "GF_SERVER_HTTP_PORT": config.port,
@@ -258,6 +257,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,
             },
         )
         container = container_builder.build()