-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
Description
The Pyrra addon should be able to get a common labels object passed and then pick that one up for all SLOs that are part of its addon.
I'm migrating its SLOs to the Thanos Ruler and I'm doing this:
'slo-apiserver-read-response-errors': { metadata+: { labels+: { prometheus: 'thanos-k8s' } } },
'slo-apiserver-write-response-errors': { metadata+: { labels+: { prometheus: 'thanos-k8s' } } },
'slo-kubelet-request-errors': { metadata+: { labels+: { prometheus: 'thanos-k8s' } } },
'slo-prometheus-notification-errors': { metadata+: { labels+: { prometheus: 'thanos-k8s' } } },
'slo-prometheus-operator-http-errors':{ metadata+: { labels+: { prometheus: 'thanos-k8s' } } },
'slo-prometheus-operator-reconcile-errors': { metadata+: { labels+: { prometheus: 'thanos-k8s' } } },
'slo-prometheus-query-errors': { metadata+: { labels+: { prometheus: 'thanos-k8s' } } },
'slo-prometheus-rule-evaluation-failures': { metadata+: { labels+: { prometheus: 'thanos-k8s' } } },
'slo-prometheus-sd-kubernetes-errors': { metadata+: { labels+: { prometheus: 'thanos-k8s' } } },Instead we should allow to pass the labels once and then pick those labels up via the values common object.
| common+: { |
kube-prometheus/jsonnet/kube-prometheus/addons/pyrra.libsonnet
Lines 236 to 239 in 69d9636
| labels: { | |
| prometheus: 'k8s', | |
| role: 'alert-rules', | |
| }, |
cc @kakkoyun for potential contribution or improvement when making Pyrra a core component next.
Reactions are currently unavailable