From 9ae74603d4b2da46e0ab80a4a61fa596c43a0f79 Mon Sep 17 00:00:00 2001 From: Seunghun Lee Date: Thu, 16 Jan 2025 09:33:17 +0000 Subject: [PATCH] Apply omitted prometheus template bug fix The patch for prometheus.yml template bug `LP#2076660 `_ was not applied to our template used for friendly network name. This brings the fix to 2023.1 release. --- etc/kayobe/ansible/prometheus.yml.j2 | 4 ++-- .../apply-prometheus-template-fix-4ec4ee6c2785bfea.yaml | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/apply-prometheus-template-fix-4ec4ee6c2785bfea.yaml diff --git a/etc/kayobe/ansible/prometheus.yml.j2 b/etc/kayobe/ansible/prometheus.yml.j2 index 8ee107ecd..c40b0cdcb 100644 --- a/etc/kayobe/ansible/prometheus.yml.j2 +++ b/etc/kayobe/ansible/prometheus.yml.j2 @@ -273,9 +273,9 @@ scrape_configs: alerting: alertmanagers: - - static_configs: - - targets: + - static_configs: {% for host in groups["prometheus-alertmanager"] %} + - targets: - '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host]['prometheus_alertmanager_port'] }}' {% if hostvars[host].prometheus_instance_label | default(false, true) %} labels: diff --git a/releasenotes/notes/apply-prometheus-template-fix-4ec4ee6c2785bfea.yaml b/releasenotes/notes/apply-prometheus-template-fix-4ec4ee6c2785bfea.yaml new file mode 100644 index 000000000..5aade4453 --- /dev/null +++ b/releasenotes/notes/apply-prometheus-template-fix-4ec4ee6c2785bfea.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixed an issue with the ``prometheus.yml`` template which would break when + deploying alertmanager.