forked from kubernetes/node-problem-detector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
node-problem-detector.yaml
141 lines (141 loc) · 4.07 KB
/
node-problem-detector.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: node-problem-detector
namespace: kube-system
labels:
app: node-problem-detector
spec:
selector:
matchLabels:
app: node-problem-detector
template:
metadata:
labels:
app: node-problem-detector
spec:
hostNetwork: true
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/os
operator: In
values:
- linux
containers:
- name: node-problem-detector
command:
- /node-problem-detector
- --logtostderr
- --config.system-log-monitor=/config/kernel-monitor.json
- --config.custom-plugin-monitor=/config/inodes-problem-monitor.json,/config/systemd-check-monitor.json,/config/health-checker-kubelet.json,/config/health-checker-containerd.json
image: cr-hn-1.bizflycloud.vn/cecd854937c8421b81d1d73789acad52/node-problem-detector:v1.0.1
resources:
limits:
cpu: 100m
memory: 200Mi
requests:
cpu: 100m
memory: 200Mi
imagePullPolicy: Always
securityContext:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: log
mountPath: /var/log
readOnly: true
- name: kmsg
mountPath: /dev/kmsg
readOnly: true
# Make sure node problem detector is in the same timezone
# with the host.
- name: localtime
mountPath: /etc/localtime
readOnly: true
- name: config
mountPath: /config
readOnly: true
- mountPath: /etc/machine-id
name: machine-id
readOnly: true
- mountPath: /run/systemd/system
name: systemd
- mountPath: /var/run/containerd/containerd.sock
name: containterd-sock
- name: cgroup
mountPath: /sys/fs/cgroup
readOnly: true
- mountPath: /var/run/dbus/
name: dbus
mountPropagation: Bidirectional
- name: systemctl
mountPath: /bin/systemctl
serviceAccountName: node-problem-detector
volumes:
- name: log
# Config `log` to your system log directory
hostPath:
path: /var/log/
- name: kmsg
hostPath:
path: /dev/kmsg
- name: localtime
hostPath:
path: /etc/localtime
- name: machine-id
hostPath:
path: /etc/machine-id
type: "File"
- name: systemd
hostPath:
path: /run/systemd/system/
type: ""
- name: dbus
hostPath:
path: /var/run/dbus/
type: ""
- name: containterd-sock
hostPath:
path: /var/run/containerd/containerd.sock
type: ""
- name: cgroup
hostPath:
path: /sys/fs/cgroup
type: Directory
- name: systemctl
hostPath:
path: /bin/systemctl
type: ""
- name: config
configMap:
defaultMode: 0777
name: node-problem-detector-config
items:
- key: kernel-monitor.json
path: kernel-monitor.json
- key: check_inodes.sh
path: check_inodes.sh
- key: check_systemd.sh
path: check_systemd.sh
- key: inodes-problem-monitor.json
path: inodes-problem-monitor.json
- key: systemd-check-monitor.json
path: systemd-check-monitor.json
- key: health-checker-kubelet.json
path: health-checker-kubelet.json
- key: health-checker-containerd.json
path: health-checker-containerd.json
tolerations:
- effect: NoSchedule
operator: Exists
- effect: NoExecute
operator: Exists