Question about alert manager peers address and $_config.cluster
anarcher opened this issue · 2 comments
Hello,
I have a question that $._config.cluster
is suitable or not to use for alertmanager's peer address. In k8s world, the address works with ...%s.cluster.local:%s
(this means that $._config.cluster = 'cluster'
?) What is the meaning of $._config.cluster
? :-)
https://github.com/grafana/cortex-jsonnet/blob/main/cortex/alertmanager.libsonnet#L14
local peers = if isHA then
[
'alertmanager-%d.alertmanager.%s.svc.%s.local:%s' % [i, $._config.namespace, $._config.cluster, $._config.alertmanager.gossip_port]
for i in std.range(0, $._config.alertmanager.replicas - 1)
]
else [],
In k8s world, the address works with ...%s.cluster.local:%s (this means that
$._config.cluster = 'cluster' ?) What is the meaning of $ ._config.cluster? :-)
The $._config.cluster
is used to customise the cluster
name in the local DNS. We have clusters named differently but if in your case it's cluster
then you can just set it to cluster
.
Thanks for the kind reply. :-)