-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkubernetes.yaml
71 lines (71 loc) · 1.53 KB
/
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
---
apiVersion: v1
kind: Namespace
metadata:
name: oled
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
app: oled
name: oled
namespace: oled
spec:
selector:
matchLabels:
app: oled
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: "100%" # replace all of them at once
template:
metadata:
labels:
app: oled
spec:
automountServiceAccountToken: false
containers:
- name: oled
command: ["oled"]
args:
- --mounts=/host/data/chunks
- --load
- --memory
- --brightness=dim
- --device=/host/dev/i2c-0
image: m3t0r/oled:latest
imagePullPolicy: Always
env:
- name: OLED_HOSTNAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
securityContext:
privileged: true # for access to i2c device
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
resources:
requests:
cpu: 10m
memory: 1Mi
limits:
cpu: 20m
memory: 5Mi
volumeMounts:
- mountPath: /host
mountPropagation: HostToContainer
name: root
readOnly: true
restartPolicy: Always
securityContext: # write access to i2c device
runAsNonRoot: false
runAsUser: 0
runAsGroup: 0
volumes:
- hostPath:
path: /
name: root