Skip to content

pyrra: Pass labels to merge via values common objects #2547

@metalmatze

Description

@metalmatze

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions