|
26 | 26 | 'experimental.alertmanager.enable-api': 'true', |
27 | 27 | 'alertmanager.storage.path': '/data', |
28 | 28 | 'alertmanager.web.external-url': '%s/alertmanager' % $._config.external_url, |
29 | | - } + if hasFallbackConfig then { |
30 | | - 'alertmanager.configs.fallback': '/configs/alertmanager_fallback_config.yaml', |
31 | | - } else {}, |
| 29 | + } + |
| 30 | + (if hasFallbackConfig then { |
| 31 | + 'alertmanager.configs.fallback': '/configs/alertmanager_fallback_config.yaml', |
| 32 | + } else {}) + |
| 33 | + (if isHA then { |
| 34 | + 'alertmanager.cluster.listen-address': '[$(POD_IP)]:%s' % $._config.alertmanager.gossip_port, |
| 35 | + 'alertmanager.cluster.peers': std.join(',', peers), |
| 36 | + } else { |
| 37 | + 'alertmanager.cluster.listen-address': '', |
| 38 | + }), |
32 | 39 |
|
33 | 40 | alertmanager_fallback_config_map: |
34 | 41 | if hasFallbackConfig then |
|
59 | 66 | else [], |
60 | 67 | ) + |
61 | 68 | container.withEnvMixin([container.envType.fromFieldPath('POD_IP', 'status.podIP')]) + |
62 | | - container.withArgsMixin( |
63 | | - $.util.mapToFlags($.alertmanager_args) + |
64 | | - if isHA then |
65 | | - ['--alertmanager.cluster.listen-address=[$(POD_IP)]:%s' % $._config.alertmanager.gossip_port] + |
66 | | - ['--alertmanager.cluster.peers=%s' % std.join(',', peers)] |
67 | | - else [], |
68 | | - ) + |
| 69 | + container.withArgsMixin($.util.mapToFlags($.alertmanager_args)) + |
69 | 70 | container.withVolumeMountsMixin( |
70 | 71 | [volumeMount.new('alertmanager-data', '/data')] + |
71 | 72 | if hasFallbackConfig then |
|
0 commit comments