cortexproject / cortex

A horizontally scalable, highly available, multi-tenant, long term Prometheus.
https://cortexmetrics.io/
Apache License 2.0
5.46k stars 794 forks source link

Alertmanager cluster CLI flags have the wrong prefix #3670

Closed pracucci closed 3 years ago

pracucci commented 3 years ago

Describe the bug The multitenant alertmanager CLI flags used to configure the alertmanager cluster are missing the -alertmanager. prefix (they start with -cluster. which is quite generic and may lead to misunderstandings): https://github.com/cortexproject/cortex/blob/e4867d81778014c9fbb053e3f05743fb0b39853f/pkg/alertmanager/multitenant.go#L118-L121

According to the v1 guarantees, only the alertmanager APIs are marked experimental, so we can't change these CLI flags straightaway but we need to introduce the new flags, deprecate the old ones (while keeping backward compatibility) and remove the old ones after 2 releases.

gotjosh commented 3 years ago

While we're at this, we need to change cluster.peer to accept multiple peers as part of its input. The model where we need to repeat the flag several types does not work well with our integration test framework that assumes flags are a map.

We have flagext.StringSliceCSV for these purposes.