-
Notifications
You must be signed in to change notification settings - Fork 529
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
Test and fix custom labels support in mixin #1697
Conversation
@@ -1,10 +1,10 @@ | |||
{ | |||
prometheusAlerts+:: | |||
{ _config:: $._config + $._group_config } + |
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.
Moved here so I can extend _config
in alert-utils.libsonnet
.
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com> Signed-off-by: Marco Pracucci <marco@pracucci.com>
196938a
to
de4c989
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.
This looks great, thanks! I just added some comments of minor importance
I will wait next week before merging, both to give the opportunity to other engineers to review it and not deploy these alerts changes right before Easter. |
I double checked the compiled alerts, manually tested few alerts and changes LGTM. Going to merge it. |
What this PR does
We just merged #1651 which adds support to customise the cluster label. We already had config options to customise the instance (eg. pod) and node labels.
However, are we relatively confident the labels customization is applied everywhere? It's very difficult to spot during code reviews, so I though if we could add any test. In this PR I'm proposing to introduce a basic test (in bash) checking if, after renaming cluster/instance/node labels, they're still used somewhere.
Thanks to these tests, I've spot several issues that I'm fixing in this PR too. In theory this PR should be a noop when mixin is compiled with default config, but you will see diff in
operations/mimir-mixin-compiled/alerts.yaml
. Reason is that fix these issues I changed the usage of hardcodedinstance
label with the configured one which ispod
. At Grafana Labs,instance
andpod
labels can be used interchangeably, because they both identify the pod.Which issue(s) this PR fixes or relates to
N/A
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]