Skip to content

Commit

Permalink
apps sc: Added possibility to add additional receivers for alertmanager
Browse files Browse the repository at this point in the history
  • Loading branch information
Xartos committed Feb 11, 2025
1 parent 38257cb commit 097d372
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/sc-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,7 @@ alerts:
apiUrl: https://api.eu.opsgenie.com
# Configure custom alert receivers
customReceivers: []
customRoutes: []

externalTrafficPolicy:
# Whitelisting requires externalTrafficPolicy.local to be true
Expand Down
14 changes: 14 additions & 0 deletions config/schemas/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4007,6 +4007,20 @@ properties:
customReceivers:
title: Alert Custom Receivers
type: array
description: |-
Additional receivers that will be added to the configuration of alertmanager
> [!note]
> See [the upstream documentation](https://prometheus.io/docs/alerting/latest/configuration/#receiver) for reference.
customRoutes:
title: Additional custom routes
description: |-
Additional route receivers that will be added to the configuration of alertmanager
> [!note]
> See [the upstream documentation](https://prometheus.io/docs/alerting/latest/configuration/#route) for reference.
default: []
type: array
opsGenie:
title: Alert OpsGenie Config
description: Configure alerting to OpsGenie.
Expand Down
3 changes: 3 additions & 0 deletions helmfile.d/values/kube-prometheus-stack-sc.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ alertmanager:
- receiver: 'null'
matchers:
- alertname =~ "CPUThrottlingHigh|KubeCPUOvercommit|KubeMemOvercommit"
{{ if gt (len .Values.alerts.customRoutes) 0 -}}
{{ toYaml .Values.alerts.customRoutes | nindent 8 }}
{{- end }}
receivers:
- name: 'null'
- name: heartbeat
Expand Down

0 comments on commit 097d372

Please sign in to comment.