Skip to content

Commit a2f5a73

Browse files
committed
fix: sort redfish_exporter_targets to avoid config changes
When templating `redfish_exporter_targets` in `60-redfish.yml` the groups are written randomly and as a result can cause unnecessary updates to the templated file which can lead to reboots of prometheus as well as polluting configuration diff. Signed-off-by: Jack Hodgkiss <jack@stackhpc.com>
1 parent f4c7cd1 commit a2f5a73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

etc/kayobe/kolla/config/prometheus/prometheus.yml.d/60-redfish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ scrape_configs:
1616
- target_label: __address__
1717
replacement: "{{ lookup('vars', admin_oc_net_name ~ '_ips')[groups.seed.0] }}:9610"
1818
static_configs:
19-
{% for host in groups.get('redfish_exporter_targets', []) %}
19+
{% for host in (groups.get('redfish_exporter_targets', []) | sort) %}
2020
- targets:
2121
- '{{ hostvars[host]["redfish_exporter_target_address"] }}'
2222
labels:

0 commit comments

Comments
 (0)