Skip to content

Commit

Permalink
Merge pull request grafana/cortex-jsonnet#359 from grafana/fix-alertm…
Browse files Browse the repository at this point in the history
…anager-drift

Fix alertmanager config change introduced in grafana/cortex-jsonnet#344
  • Loading branch information
pracucci authored Jul 22, 2021
2 parents 7acc6b8 + fc6ce7c commit 8389bb0
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions operations/mimir/alertmanager.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,7 @@
} +
(if hasFallbackConfig then {
'alertmanager.configs.fallback': '/configs/alertmanager_fallback_config.yaml',
} else {}) +
(if isHA then {
'alertmanager.cluster.listen-address': '[$(POD_IP)]:%s' % $._config.alertmanager.gossip_port,
'alertmanager.cluster.peers': std.join(',', peers),
} else {
'alertmanager.cluster.listen-address': '',
}),
} else {}),

alertmanager_fallback_config_map:
if hasFallbackConfig then
Expand Down Expand Up @@ -66,7 +60,16 @@
else [],
) +
container.withEnvMixin([container.envType.fromFieldPath('POD_IP', 'status.podIP')]) +
container.withArgsMixin($.util.mapToFlags($.alertmanager_args)) +
container.withArgsMixin(
$.util.mapToFlags($.alertmanager_args) +
(
if isHA then
['--alertmanager.cluster.listen-address=[$(POD_IP)]:%s' % $._config.alertmanager.gossip_port] +
['--alertmanager.cluster.peers=%s' % std.join(',', peers)]
else
['-alertmanager.cluster.listen-address=""']
)
) +
container.withVolumeMountsMixin(
[volumeMount.new('alertmanager-data', '/data')] +
if hasFallbackConfig then
Expand Down

0 comments on commit 8389bb0

Please sign in to comment.