From 5057be0a35983ee2b358c79af62b490b4d0f0b53 Mon Sep 17 00:00:00 2001 From: WrenIX Date: Wed, 18 Sep 2024 00:02:53 +0200 Subject: [PATCH] fix(infra-certificates): group alerts by namespace --- infra-certificates/templates/prometheus-rule.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/infra-certificates/templates/prometheus-rule.yaml b/infra-certificates/templates/prometheus-rule.yaml index 76eedc9..7e7fe0a 100644 --- a/infra-certificates/templates/prometheus-rule.yaml +++ b/infra-certificates/templates/prometheus-rule.yaml @@ -18,6 +18,7 @@ spec: severity: "critical" detectedBy: "CertManager" {{` + namespace: "{{ $labels.exported_namespace }}" annotations: summary: "SSL certificate {{ $labels.name }} in namespace {{ $labels.exported_namespace }} by {{ $labels.issuer_kind }} {{ $labels.issuer_name }} will expire in {{ $value | humanizeDuration }}" `}} @@ -29,6 +30,7 @@ spec: severity: "warning" detectedBy: "CertManager" {{` + namespace: "{{ $labels.exported_namespace }}" annotations: summary: "SSL certificate {{ $labels.name }} in namespace {{ $labels.exported_namespace }} by {{ $labels.issuer_kind }} {{ $labels.issuer_name }} will expire in {{ $value | humanizeDuration }}." `}} @@ -39,6 +41,7 @@ spec: labels: severity: "critical" {{` + namespace: "{{ $labels.exported_namespace }}" annotations: summary: "Certificate {{ $labels.name }} in namespace {{ $labels.exported_namespace }} is not ready by {{ $labels.issuer_kind }} {{ $labels.issuer_name }}" `}}