The Ruler will use the wrong hostname for AlertManager when
- Release name is not cortex
- config.ruler.alertmanager_url is not configured
- config.ruler.enable_alertmanager_discovery is true
This happens because ruler deployment file is using "cortex.name" from template which will always resolved to "cortex-headless". However, Alertmanager headless service uses "cortex.fullname" to generate the service name which can be different from "cortex-headless".
Because of this, when the above condition is met, ruler will be deployed using the wrong alertmanager URL