-
Notifications
You must be signed in to change notification settings - Fork 155
/
sysbox-install.yaml
181 lines (181 loc) · 4.76 KB
/
sysbox-install.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: sysbox-label-node
namespace: kube-system
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: sysbox-node-labeler
rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "patch"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "delete", "watch"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: sysbox-label-node-rb
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: sysbox-node-labeler
subjects:
- kind: ServiceAccount
name: sysbox-label-node
namespace: kube-system
---
apiVersion: v1
kind: ConfigMap
metadata:
name: sysbox-operational-attributes
namespace: kube-system
data:
SYSBOX_MGR_CONFIG: ""
SYSBOX_FS_CONFIG: ""
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: sysbox-deploy-k8s
namespace: kube-system
spec:
selector:
matchLabels:
sysbox-install: "yes"
template:
metadata:
labels:
sysbox-install: "yes"
spec:
serviceAccountName: sysbox-label-node
nodeSelector:
sysbox-install: "yes"
tolerations:
- key: "sysbox-runtime"
operator: "Equal"
value: "not-running"
effect: "NoSchedule"
containers:
- name: sysbox-deploy-k8s
image: registry.nestybox.com/nestybox/sysbox-deploy-k8s:v0.6.4
imagePullPolicy: Always
command: [ "bash", "-c", "/opt/sysbox/scripts/sysbox-deploy-k8s.sh ce install" ]
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: SYSBOX_MGR_CONFIG
valueFrom:
configMapKeyRef:
name: sysbox-operational-attributes
key: SYSBOX_MGR_CONFIG
- name: SYSBOX_FS_CONFIG
valueFrom:
configMapKeyRef:
name: sysbox-operational-attributes
key: SYSBOX_FS_CONFIG
securityContext:
privileged: true
volumeMounts:
- name: host-etc
mountPath: /mnt/host/etc
- name: host-osrelease
mountPath: /mnt/host/os-release
- name: host-dbus
mountPath: /var/run/dbus
- name: host-run-systemd
mountPath: /run/systemd
- name: host-lib-systemd
mountPath: /mnt/host/lib/systemd/system
- name: host-etc-systemd
mountPath: /mnt/host/etc/systemd/system
- name: host-lib-sysctl
mountPath: /mnt/host/lib/sysctl.d
- name: host-opt-lib-sysctl
mountPath: /mnt/host/opt/lib/sysctl.d
- name: host-usr-bin
mountPath: /mnt/host/usr/bin
- name: host-opt-bin
mountPath: /mnt/host/opt/bin
- name: host-usr-local-bin
mountPath: /mnt/host/usr/local/bin
- name: host-opt-local-bin
mountPath: /mnt/host/opt/local/bin
- name: host-usr-lib-mod-load
mountPath: /mnt/host/usr/lib/modules-load.d
- name: host-opt-lib-mod-load
mountPath: /mnt/host/opt/lib/modules-load.d
- name: host-run
mountPath: /mnt/host/run
- name: host-var-lib
mountPath: /mnt/host/var/lib
volumes:
- name: host-etc
hostPath:
path: /etc
- name: host-osrelease
hostPath:
path: /etc/os-release
- name: host-dbus
hostPath:
path: /var/run/dbus
- name: host-run-systemd
hostPath:
path: /run/systemd
- name: host-lib-systemd
hostPath:
path: /lib/systemd/system
- name: host-etc-systemd
hostPath:
path: /etc/systemd/system
- name: host-lib-sysctl
hostPath:
path: /lib/sysctl.d
- name: host-opt-lib-sysctl
hostPath:
path: /opt/lib/sysctl.d
- name: host-usr-bin
hostPath:
path: /usr/bin/
- name: host-opt-bin
hostPath:
path: /opt/bin/
- name: host-usr-local-bin
hostPath:
path: /usr/local/bin/
- name: host-opt-local-bin
hostPath:
path: /opt/local/bin/
- name: host-usr-lib-mod-load
hostPath:
path: /usr/lib/modules-load.d
- name: host-opt-lib-mod-load
hostPath:
path: /opt/lib/modules-load.d
- name: host-run
hostPath:
path: /run
- name: host-var-lib
hostPath:
path: /var/lib
updateStrategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
---
apiVersion: node.k8s.io/v1
kind: RuntimeClass
metadata:
name: sysbox-runc
handler: sysbox-runc
scheduling:
nodeSelector:
sysbox-runtime: running
---