flux-charts/infra-trivy/templates/alertmanager-config.yaml
2023-11-25 03:01:31 +01:00

39 lines
1,018 B
YAML

{{- if (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1alpha1/AlertmanagerConfig") }}
---
apiVersion: "monitoring.coreos.com/v1alpha1"
kind: "AlertmanagerConfig"
metadata:
name: "trivy-alertmanager-conf"
labels:
{{- toYaml .Values.commons.prometheus.alertmanager.labels | nindent 4 }}
spec:
inhibitRules:
- sourceMatch:
- name: "severity"
matchType: "="
value: "critical"
targetMatch:
- name: "severity"
matchType: "=~"
value: "warning|info"
equal:
- "exported_namespace"
- "alertname"
- "image_repository"
- "image_registry"
- "image_tag"
- sourceMatch:
- name: "severity"
matchType: "="
value: "warning"
targetMatch:
- name: "severity"
matchType: "="
value: "info"
equal:
- "exported_namespace"
- "alertname"
- "image_repository"
- "image_registry"
- "image_tag"
{{- end }}