forked from devopyio/zabbix-alertmanager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kubernetes-manifest.yaml
89 lines (88 loc) · 1.76 KB
/
kubernetes-manifest.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
apiVersion: v1
kind: Service
metadata:
name: zal
labels:
name: zal
annotations:
prometheus.io/path: /metrics
prometheus.io/scrape: "true"
spec:
ports:
- port: 9095
protocol: TCP
targetPort: 9095
selector:
k8s-app: zal
---
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: zal
spec:
minAvailable: 1
selector:
matchLabels:
k8s-app: zal
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
k8s-app: zal
name: zal
spec:
replicas: 2
selector:
matchLabels:
k8s-app: zal
template:
metadata:
labels:
name: zal
k8s-app: zal
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: k8s-app
operator: In
values:
- zal
topologyKey: kubernetes.io/hostname
weight: 100
containers:
- name: zal
image: quay.io/devopyio/zabbix-alertmanager:v1.2.0
args:
- send
- --log.level=info
- --zabbix-addr=ZABBIX_ADDR:10051
- --default-host=infra
- --hosts-path=/etc/zal/sender-config.yml
ports:
- containerPort: 9095
volumeMounts:
- name: config-volume
mountPath: /etc/zal
volumes:
- name: config-volume
configMap:
name: zal
---
apiVersion: v1
kind: ConfigMap
metadata:
name: zal
namespace: sys-mon
data:
sender-config.yml: |-
# Resolver name to zabbix host mapping
# web is Alertmanager's resolver name
# and the mapping is Zabbix host name.
infra: infra
web: webteam
---