feat: mixin, allow overriding of some labels by parameterizing mixin recording/alert rules - #11495
Conversation
|
Trivy scan found the following vulnerabilities:
|
cstyan
left a comment
There was a problem hiding this comment.
I think making the label selectors more modular is a good idea
|
@alex5517 looking good! I think we're more or less good to go. Unfortunately we need to merge/rebase on master to pull in changes for CI. |
|
@alex5517 sorry, one last change. Looks like the linter doesn't like the newline after the imports, or maybe there's a whitespace tab on that line? |
|
Found the culprit :) |
|
We also need to update the compiled mixins that are used for the helm chart |
|
Done :) |
|
Sorry @alex5517 because I missed your earlier updates it looks like we need to pull in |
|
@cstyan, i have merged changes from main, and re-run make loki-mixin |
|
@alex5517 sorry, the mixin check is still failing because it thinks there should be additional changes to the compiled mixin. It might be due to jsonnet versions? The check uses jsonnet v0.20 and doesn't use our build image ( |
|
Sorry for the delay, i synced the branch and ran the commands you asked. |
| job_labels: [$._config.per_cluster_label, $._config.per_namespace_label, $._config.per_job_label], | ||
| cluster_labels: [$._config.per_cluster_label, $._config.per_namespace_label], |
There was a problem hiding this comment.
can we make these names more explicit? even if it's long, I'd prefer to know all labels that are present from the name OR have to use each per_x_label for readability sake
There was a problem hiding this comment.
I can change it, but would it not be better if it matches what mimir-mixin does, så that it easier for one who has used mimir-mixin to also use loki-mixin?
Signed-off-by: Alexander Soelberg Heidarsson <89837986+alex5517@users.noreply.github.com>
What this PR does / why we need it:
Allows for more dynamic generation of recording/alert rules.
Which issue(s) this PR fixes:
Fixes N/A
Special notes for your reviewer:
Checklist
CONTRIBUTING.mdguide (required)CHANGELOG.mdupdatedadd-to-release-noteslabeldocs/sources/setup/upgrade/_index.mdproduction/helm/loki/Chart.yamland updateproduction/helm/loki/CHANGELOG.mdandproduction/helm/loki/README.md. Example PRdeprecated-config.yamlanddeleted-config.yamlfiles respectively in thetools/deprecated-config-checkerdirectory. Example PR