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.
|
labels: { |
|
prometheus: 'k8s', |
|
role: 'alert-rules', |
|
}, |
cc @kakkoyun for potential contribution or improvement when making Pyrra a core component next.
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:
Instead we should allow to pass the labels once and then pick those labels up via the values common object.
kube-prometheus/jsonnet/kube-prometheus/addons/pyrra.libsonnet
Line 3 in 69d9636
kube-prometheus/jsonnet/kube-prometheus/addons/pyrra.libsonnet
Lines 236 to 239 in 69d9636
cc @kakkoyun for potential contribution or improvement when making Pyrra a core component next.