don't add --cluster.peer if there are no other peers

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2021-05-31 19:51:23 +02:00
parent 4ee375e104
commit e1c585bc9a
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 2 additions and 0 deletions

View File

@ -25,7 +25,9 @@ services:
- '--cluster.probe-timeout={{ alertmanager_probe_timeout }}'
- '--cluster.probe-interval={{ alertmanager_probe_interval }}'
{% for peer in alertmanager_cluster_peers %}
{% if peer.Node != hostname %}
- '--cluster.peer={{ peer.ServiceAddress }}:{{ alertmanager_cluster_port }}' # {{ peer.Node }}
{% endif %}
{% endfor %}
{% if alertmanager_oauth_id %}