Open WhiteDiamondz opened 3 months ago
Some pointers to start looking at the issue:
The source of truth for the alerting rules is currently defined in mimir's jsonnet mixin. The jsonnet files are compiled into static YAML, which is injected into k8s PrometheusRule
object via Helm template (ref. source code).
Note that jsonnet mixin already allows adding additional labels to the alerting rules, via $._config.alert_extra_labels
(ref. source code). This is, of course, doesn't help the Helm chart's users, unfortunately.
Is your feature request related to a problem? Please describe.
Custom labels added to alerts are always useful and are often used for routing purposes. The mimir-distributed helm chart allows the user to deploy default PrometheusRules (alerts and recording rules). However, no option exists to add a custom label to all the alerts (and rules?) deployed.
Describe the solution you'd like
Much like it is the case for other helm charts like Loki, a posibility would be to create and configure a key like:
Describe alternatives you've considered
Unfortunately with my knowledge I currently don't see other alternatives.
Additional context
Even if the structure is different, an example of this feature exists for the Loki helm chart: https://github.com/grafana/loki/pull/9020