-
Notifications
You must be signed in to change notification settings - Fork 313
feature: extract label matchers from the prometheus-rules labels #3175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feature: extract label matchers from the prometheus-rules labels #3175
Conversation
41dce1e
to
afc3668
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionality looks good, one documentation request.
docs/sources/reference/components/mimir/mimir.rules.kubernetes.md
Outdated
Show resolved
Hide resolved
By the way, do you think it would make sense to add this feature (extraQueryMatchers) to loki.rules.kubernetes as well? Do you think adding a Boolean (is_structrued_metadata) would work? |
docs/sources/reference/components/mimir/mimir.rules.kubernetes.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Clayton Cornell <[email protected]>
docs/sources/reference/components/mimir/mimir.rules.kubernetes.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/mimir/mimir.rules.kubernetes.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Clayton Cornell <[email protected]>
docs/sources/reference/components/mimir/mimir.rules.kubernetes.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/mimir/mimir.rules.kubernetes.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Clayton Cornell <[email protected]>
Co-authored-by: Clayton Cornell <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving for docs
PR Description
This pull request introduces enhances the
mimir.rules.kubernetes
component by adding extra label matchers to queries and improving the validation logic. Additionally, it includes updates to the test cases to cover these new functionalities.Which issue(s) this PR fixes
Fixes #3172
Notes to the Reviewer
I tried to implement the field selector approach in the component but I could not really see how it can work. Considering the only fields that would be useful are the rule name, namespace, labels and annotations, maybe we should add a valueFromName,valueFromNamespace and valueFromAnnotation instead of a field selector?
PR Checklist