apiVersion: v1
kind: Secret
metadata:
  name: 'alertmanager-{{ meta.name }}'
  namespace: '{{ meta.namespace }}'
type: Opaque
stringData:
  alertmanager.yaml: |-
    global:
      resolve_timeout: 5m
    route:
      group_by: ['job']
      group_wait: 30s
      group_interval: 5m
      repeat_interval: 12h
{% if servicetelemetry_vars.alerting.alertmanager.receivers.snmp_traps.enabled %}
      receiver: 'snmp_wh'
{% else %}
      receiver: 'null'
{% endif %}
    receivers:
{% if servicetelemetry_vars.alerting.alertmanager.receivers.snmp_traps.enabled %}
    - name: 'snmp_wh'
      webhook_configs:
         - url: 'http://{{ meta.name }}-prometheus-webhook-snmp:9099'
{% else %}
    - name: 'null'
{% endif %}
