-
Notifications
You must be signed in to change notification settings - Fork 81
/
Copy pathalertmanager-deployment.yaml
executable file
·106 lines (102 loc) · 2.21 KB
/
alertmanager-deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Copyright 2019, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
apiVersion: apps/v1beta1
kind: Deployment
metadata:
labels:
name: alertmanager
name: alertmanager
namespace: monitoring
spec:
replicas: 1
selector:
matchLabels:
name: alertmanager
template:
metadata:
creationTimestamp: null
labels:
name: alertmanager
spec:
hostname: alertmanager
containers:
- image: prom/alertmanager:v0.14.0
imagePullPolicy: IfNotPresent
name: alertmanager
ports:
- name: alertmanager
containerPort: 9093
protocol: TCP
resources:
limits:
cpu: 500m
memory: 2500Mi
requests:
cpu: 100m
memory: 100Mi
volumeMounts:
# - mountPath: /var/lib/alertmanager
# name: data
- mountPath: /etc/alertmanager/
name: config-volume
restartPolicy: Always
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- name: config-volume
configMap:
name: alertmanager-configuration
# - emptyDir: {}
# name: data
---
apiVersion: v1
kind: ConfigMap
metadata:
name: alertmanager-configuration
namespace: monitoring
data:
config.yml: |-
route:
group_by: ['alertname']
group_wait: 10s
group_interval: 10s
repeat_interval: 1h
receiver: 'web.hook.scaleup'
receivers:
- name: 'web.hook.scaleup'
webhook_configs:
- url: 'http://webhook:9000/hooks/scaleup'
inhibit_rules:
- source_match:
severity: 'critical'
target_match:
severity: 'warning'
equal: ['alertname', 'dev', 'instance']
---
apiVersion: v1
kind: Service
metadata:
name: alertmanager
namespace: monitoring
spec:
type: ClusterIP
selector:
name: alertmanager
ports:
- port: 9093
---
apiVersion: v1
kind: Service
metadata:
name: alertweb
namespace: monitoring
spec:
type: NodePort
selector:
name: alertmanager
ports:
- port: 9093
protocol: TCP
targetPort: 9093
nodePort: 32001
type: NodePort