Skip to content

Commit

Permalink
Fix JSONNET rendiner for alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
mnaser committed Jun 25, 2024
1 parent b7b010a commit cb3d38c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions roles/kube_prometheus_stack/files/jsonnet/rules.jsonnet
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
local mixins = import 'mixins.libsonnet';

{
[mixin]:
mixins[mixin].prometheusAlerts + (
if std.objectHasAll(mixins[mixin], 'prometheusRules') then mixins[mixin].prometheusRules else {}
)
for mixin in std.objectFields(mixins)
[mixin]: {
groups: (mixins[mixin].prometheusAlerts.groups + if std.objectHasAll(mixins[mixin], 'prometheusRules') then mixins[mixin].prometheusRules.groups else [])
} for mixin in std.objectFields(mixins)
}

0 comments on commit cb3d38c

Please sign in to comment.