helm-charts/openfaas/templates/alertmanager-cfg.yaml
2021-01-17 04:09:41 +03:00

47 lines
1.3 KiB
YAML

{{- $functionNs := default .Release.Namespace .Values.functionNamespace }}
{{- if .Values.alertmanager.create }}
---
kind: ConfigMap
apiVersion: v1
metadata:
labels:
app: {{ template "openfaas.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
component: alertmanager-config
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: alertmanager-config
namespace: {{ .Release.Namespace | quote }}
data:
alertmanager.yml: |
route:
group_by: ['alertname', 'cluster', 'service']
group_wait: 5s
group_interval: 10s
repeat_interval: 30s
receiver: scale-up
routes:
- match:
service: gateway
receiver: scale-up
severity: major
inhibit_rules:
- source_match:
severity: 'critical'
target_match:
severity: 'warning'
equal: ['alertname', 'cluster', 'service']
receivers:
- name: 'scale-up'
webhook_configs:
- url: http://gateway.{{ .Release.Namespace }}:8080/system/alert
send_resolved: true
{{- if .Values.basic_auth }}
http_config:
basic_auth:
username: admin
password_file: /var/secrets/basic-auth-password
{{- end -}}
{{- end }}