fix(infra-certificates): group alerts by namespace

This commit is contained in:
WrenIX 2024-09-18 00:02:53 +02:00
parent 2c7608d85a
commit 5057be0a35
Signed by: wrenix
GPG key ID: 7AFDB012974B1BB5

View file

@ -18,6 +18,7 @@ spec:
severity: "critical" severity: "critical"
detectedBy: "CertManager" detectedBy: "CertManager"
{{` {{`
namespace: "{{ $labels.exported_namespace }}"
annotations: annotations:
summary: "SSL certificate {{ $labels.name }} in namespace {{ $labels.exported_namespace }} by {{ $labels.issuer_kind }} {{ $labels.issuer_name }} will expire in {{ $value | humanizeDuration }}" 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" severity: "warning"
detectedBy: "CertManager" detectedBy: "CertManager"
{{` {{`
namespace: "{{ $labels.exported_namespace }}"
annotations: annotations:
summary: "SSL certificate {{ $labels.name }} in namespace {{ $labels.exported_namespace }} by {{ $labels.issuer_kind }} {{ $labels.issuer_name }} will expire in {{ $value | humanizeDuration }}." 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: labels:
severity: "critical" severity: "critical"
{{` {{`
namespace: "{{ $labels.exported_namespace }}"
annotations: annotations:
summary: "Certificate {{ $labels.name }} in namespace {{ $labels.exported_namespace }} is not ready by {{ $labels.issuer_kind }} {{ $labels.issuer_name }}" summary: "Certificate {{ $labels.name }} in namespace {{ $labels.exported_namespace }} is not ready by {{ $labels.issuer_kind }} {{ $labels.issuer_name }}"
`}} `}}