grafana / mimir

Grafana Mimir provides horizontally scalable, highly available, multi-tenant, long-term storage for Prometheus.
https://grafana.com/oss/mimir/
GNU Affero General Public License v3.0
4.08k stars 522 forks source link

Add possibility do add common labels in helm chart #9067

Open d-mankowski-synerise opened 1 month ago

d-mankowski-synerise commented 1 month ago

Is your feature request related to a problem? Please describe.

A lot of Helm charts (e.g. kube-prometheus-stack, cert-manager) allow to define key commonLabels, which results in a set of custom labels added to every resource created by the chart (pods, deployments, statefulsets, ingresses, services, servicemonitors, crds, etc.). Right now it is not even possible to add custom labels to Mimir's deployments or statefulsets (other than by using kustomize).

Use case: e.g. we want to have generic alerts (like: pod is crashlooping) that are dynamically routed, based on the label team (on the same cluster there is stuff deployed by various teams)

Describe the solution you'd like

In values.yaml we should be able to specify something like this:

commonLabels:
  label1: value1
  label2: value2

and all resources created by Mimir chart will have those labels

Rohlik commented 3 weeks ago

This is necessary for having common alerts and route them based on label(s). Having the option (below) to add labels to just pods is not enough.

global:
  podLabels:
    owner: best_team