-
Notifications
You must be signed in to change notification settings - Fork 20
/
40-daemonset.yml
54 lines (54 loc) · 1.21 KB
/
40-daemonset.yml
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
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: smon
namespace: data
labels:
app: smon
component: sensor
spec:
selector:
matchLabels:
name: smon
template:
metadata:
labels:
name: smon
component: sensor
spec:
nodeSelector:
kubernetes.io/role: sensor
tolerations:
- key: dedicated
value: pi
effect: NoSchedule
containers:
- name: smon
image: apk8s/mosquitto-clients:1.5.7_1
command: ["/bin/bash",
"/scripts/collect.sh"]
env:
- name: DEVICE
valueFrom:
fieldRef:
fieldPath: spec.nodeName
securityContext:
privileged: true
volumeMounts:
- name: scripts
mountPath: /scripts
- name: sensor
mountPath: /sensor
resources:
limits:
memory: 200Mi
requests:
cpu: 50m
memory: 200Mi
volumes:
- name: sensor
hostPath:
path: /sys/class/thermal/thermal_zone0/
- name: scripts
configMap:
name: smon