-
Notifications
You must be signed in to change notification settings - Fork 51
/
k8s-ds-amdgpu-dp-health.yaml
53 lines (53 loc) · 1.43 KB
/
k8s-ds-amdgpu-dp-health.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
# TODO device plugin currently uses /dev/kfd to do health check
# which requires privileged container
# Might need to find better alternatives
#
# ***** this requires --allow-privileged=true set for both kube-apiserver and kubelet
#
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: amdgpu-device-plugin-daemonset
namespace: kube-system
spec:
selector:
matchLabels:
name: amdgpu-dp-ds
template:
metadata:
labels:
name: amdgpu-dp-ds
spec:
nodeSelector:
kubernetes.io/arch: amd64
priorityClassName: system-node-critical
tolerations:
- key: CriticalAddonsOnly
operator: Exists
containers:
- image: rocm/k8s-device-plugin
name: amdgpu-dp-cntr-health
workingDir: /root
command: ["./k8s-device-plugin"]
args: ["-logtostderr=true", "-stderrthreshold=INFO", "-v=5", "-pulse=2"]
securityContext:
privileged: true #Needed for /dev
capabilities:
drop: ["ALL"]
volumeMounts:
- name: dp
mountPath: /var/lib/kubelet/device-plugins
- name: sys
mountPath: /sys
- name: dev
mountPath: /dev
volumes:
- name: dp
hostPath:
path: /var/lib/kubelet/device-plugins
- name: sys
hostPath:
path: /sys
- name: dev # Needed for health check
hostPath:
path: /dev