20 lines
789 B
YAML
20 lines
789 B
YAML
---
|
|
# Drop platform alerts that only fire because the cluster has a single
|
|
# control-plane node. Uses the supported AlertRelabelConfig API rather than
|
|
# silences (which expire) or editing cluster-monitoring-operator rules (reverted).
|
|
|
|
- name: Drop single-control-plane false-positive alerts
|
|
kubernetes.core.k8s:
|
|
state: "{{ 'present' if sno_alert_tuning_dropped_alerts | length > 0 else 'absent' }}"
|
|
definition:
|
|
apiVersion: monitoring.openshift.io/v1
|
|
kind: AlertRelabelConfig
|
|
metadata:
|
|
name: "{{ sno_alert_tuning_config_name }}"
|
|
namespace: openshift-monitoring
|
|
spec:
|
|
configs:
|
|
- sourceLabels: [alertname]
|
|
regex: "{{ sno_alert_tuning_dropped_alerts | map('regex_escape') | join('|') }}"
|
|
action: Drop
|