Fix ConfigMap for Prometheus Charm 20/10220/1
authorsousaedu <eduardo.sousa@canonical.com>
Tue, 26 Jan 2021 15:30:25 +0000 (16:30 +0100)
committersousaedu <eduardo.sousa@canonical.com>
Tue, 26 Jan 2021 15:30:25 +0000 (16:30 +0100)
Change-Id: I340d65d50daa3dd40baf2123b7655bba9ed66fd5
Signed-off-by: sousaedu <eduardo.sousa@canonical.com>
installers/charm/prometheus/src/pod_spec.py

index 3e4bc44..541cf3e 100644 (file)
@@ -238,18 +238,18 @@ def _make_pod_files(config: Dict[str, Any]) -> List[Dict[str, Any]]:
                 {
                     "path": "prometheus.yml",
                     "content": (
-                        "global:"
-                        "  scrape_interval: 15s"
-                        "  evaluation_interval: 15s"
-                        "alerting:"
-                        "  alertmanagers:"
-                        "    - static_configs:"
-                        "        - targets:"
-                        "rule_files:"
-                        "scrape_configs:"
-                        "  - job_name: 'prometheus'"
-                        "    static_configs:"
-                        "      - targets: [{}]".format(config["default_target"])
+                        "global:\n"
+                        "  scrape_interval: 15s\n"
+                        "  evaluation_interval: 15s\n"
+                        "alerting:\n"
+                        "  alertmanagers:\n"
+                        "    - static_configs:\n"
+                        "        - targets:\n"
+                        "rule_files:\n"
+                        "scrape_configs:\n"
+                        "  - job_name: 'prometheus'\n"
+                        "    static_configs:\n"
+                        "      - targets: [{}]\n".format(config["default_target"])
                     ),
                 }
             ],