-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathk8s-dcu-plugin.yaml
89 lines (89 loc) · 2.19 KB
/
k8s-dcu-plugin.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
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: dcu-device-plugin-daemonset
namespace: kube-system
spec:
selector:
matchLabels:
name: dcu-dp-ds
template:
metadata:
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ""
labels:
name: dcu-dp-ds
spec:
nodeSelector:
dcu: "on"
serviceAccountName: dcu-device-plugin
hostPID: true
hostNetwork: true
nodeSelector:
dcu: "on"
tolerations:
- key: CriticalAddonsOnly
operator: Exists
containers:
- image: projecthami/dcu-vgpu-device-plugin:v1.0.5
#command: ["/bin/bash","-c","source /opt/hygondriver/env.sh && sleep infinity"]
command: [ "/root/k8s-device-plugin" ]
name: dcu-dp-cntr
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: HYGONPATH
value: /opt/dtk
- name: BASH_ENV
value: ~/.bashrc
securityContext:
privileged: true
allowPrivilegeEscalation: true
capabilities:
drop: [ "ALL" ]
add: [ "SYS_ADMIN" ]
volumeMounts:
- name: dp
mountPath: /var/lib/kubelet/device-plugins
- name: sys
mountPath: /sys
- name: dev
mountPath: /dev
- name: vdev
mountPath: /etc/vdev
- name: hwpath
mountPath: /usr/share/hwdata
- name: hygonloc
mountPath: /opt/hygondriver/
- name: lib
mountPath: /usr/local/vgpu
- name: hyhal
mountPath: /opt/hyhal
volumes:
- name: dp
hostPath:
path: /var/lib/kubelet/device-plugins
- name: sys
hostPath:
path: /sys
- name: dev
hostPath:
path: /dev
- name: vdev
hostPath:
path: /etc/vdev
type: Directory
- name: hwpath
hostPath:
path: /usr/share/hwdata
- name: hygonloc
hostPath:
path: /opt/dtk
- name: lib
hostPath:
path: /usr/local/vgpu
- name: hyhal
hostPath:
path: /opt/hyhal