From eacf508ecf242eaa42b3d9e62110413918ac3f60 Mon Sep 17 00:00:00 2001 From: Jan-Philipp Litza Date: Mon, 23 Sep 2024 16:54:10 +0200 Subject: [PATCH] Make alert rule labels configurable (#118) --- chart/templates/prometheusrules.yaml | 8 ++++---- chart/values.yaml | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/chart/templates/prometheusrules.yaml b/chart/templates/prometheusrules.yaml index bf43550..dfa2e91 100644 --- a/chart/templates/prometheusrules.yaml +++ b/chart/templates/prometheusrules.yaml @@ -34,7 +34,7 @@ spec: == 0) for: 1m labels: - severity: warning + {{- $.Values.prometheus.rules.labels | toYaml | nindent 12 }} - alert: ContainerEphemeralStorageUsageReachingLimit annotations: @@ -65,7 +65,7 @@ spec: == 0) for: 15m labels: - severity: warning + {{- $.Values.prometheus.rules.labels | toYaml | nindent 12 }} - alert: EphemeralStorageVolumeFilledUp annotations: @@ -88,7 +88,7 @@ spec: == 0) for: 1m labels: - severity: warning + {{- $.Values.prometheus.rules.labels | toYaml | nindent 12 }} - alert: EphemeralStorageVolumeFillingUp annotations: @@ -118,7 +118,7 @@ spec: == 0) for: 15m labels: - severity: warning + {{- $.Values.prometheus.rules.labels | toYaml | nindent 12 }} {{- end }} {{- end }} {{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index 9e2d5a0..c9e723a 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -59,6 +59,9 @@ prometheus: enable: false # -- How many hours in the future to predict filling up of a volume predictFilledHours: 12 + # -- What additional labels to set on alerts + labels: + severity: warning # -- Enable Pprof pprof: false