mimir
mimir copied to clipboard
tls_enabled param missing from ruler's alertmanager_client config
Describe the bug
Ruler's alertmanager_client config section does not have tls_enabled param. I am not sure if that is a bug, but other config sections with TLS settings do have such param.
To Reproduce
Steps to reproduce the behavior:
In Mimir config add this bit:
ruler:
alertmanager_client:
tls_ca_path: /etc/mimir/ca.crt
tls_cert_path: /etc/mimir/client.crt
tls_enabled: true
tls_key_path: /etc/mimir/client.key
Start Mimir:
# mimir -config.file /etc/mimir/mimir-ruler.yml
error loading config from /etc/mimir/mimir-ruler.yml: Error parsing config file: yaml: unmarshal errors:
line 141: field tls_enabled not found in type ruler.NotifierConfig
Expected behavior
Alertmanager client config for ruler was expected to have tls_enabled toggle.
Environment
# mimir --version
Mimir, version 2.3.1 (branch: release-2.3, revision: 64a71a566)
go version: go1.18.4
platform: linux/amd64
# uname -r
4.18.0-372.13.1.el8_6.x86_64
Additional Context
Configuration reference doc does not mention tls_enabled in ruler's alertmanager client config either.
You're right. The tls_enabled config option is not available for the ruler's alertmanager client, but TLS is still supported. Basically in the ruler's alertmanager client, TLS is implicitly enabled as soon as you set any TLS-related configuration option.
That being said, I understand this configuration discrepancy can be misleading and we could work to fix it. Willing to give it a try? I could offer some guidance.
Is it about a missing block entry in pkg/mimirtool/config/descriptors/mimir-v2.3.0.json?
It would be changing the configuration structure for the ruler - which is here https://github.com/grafana/mimir/blob/a3377070d3ce33953bed2e063f84d5bceadf90bd/pkg/ruler/ruler.go#L93
here is an example of the TLS config for the store-gateway client (querier.store_gateway_client in the config) https://github.com/grafana/mimir/blob/0cdd91f4649b1679b2abfbda5a23ee7aaf334870/pkg/querier/store_gateway_client.go#L103-L111
which is using the same underlying configuration as the ruler, but also has the tls_enabled flag