-
Notifications
You must be signed in to change notification settings - Fork 46
/
zabbix-agent-daemonset-kubernetes.yaml
81 lines (77 loc) · 2.03 KB
/
zabbix-agent-daemonset-kubernetes.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
apiVersion: v1
kind: Namespace
metadata:
name: infra-zabbix-agent
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: zabbix-agent
namespace: "infra-zabbix-agent"
spec:
selector:
matchLabels:
name: zabbix-agent
template:
metadata:
labels:
name: zabbix-agent
spec:
# this toleration is to have the daemonset runnable on master nodes
# tolerations:
# - key: node-role.kubernetes.io/master
# effect: NoSchedule
hostPID: true
hostIPC: true
hostNetwork: false
containers:
- resources:
requests:
cpu: 150m
memory: 128M
limits:
cpu: 200m
memory: 128M
securityContext:
privileged: true
env:
- name: ZBX_METADATA
value: "kubernetes-node"
- name: ZBX_HOSTNAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: ZBX_ACTIVESERVERS
value: "zabbix-proxy"
- name: ZBX_PASSIVESERVERS
value: "127.0.0.1,zabbix-proxy"
image: scoopex666/zabbix-agent-with-agent-extensions:latest
imagePullPolicy: Always
name: zabbix-agent
volumeMounts:
- name: rootfs
mountPath: /rootfs
- name: run
mountPath: /var/run/
- name: zabbix-agent-extensions-include
mountPath: /etc/zabbix/zabbix_agentd.d
volumes:
- name: rootfs
hostPath:
path: /
- name: run
hostPath:
path: /var/run/
- name: zabbix-agent-extensions-include
configMap:
name: zabbix-agent-extensions-include
defaultMode: 0755
---
apiVersion: v1
kind: ConfigMap
metadata:
name: zabbix-agent-extensions-include
namespace: "infra-zabbix-agent"
data:
"zabbix-agent-extensions-include.conf": |
Include=/usr/share/zabbix-agent-extensions/include.d/*.conf