@@ -16,61 +16,93 @@ spec:
16
16
spec :
17
17
serviceAccountName : resource-reader-sa
18
18
initContainers :
19
+ - name : fakedev-generator
20
+ image : intel/fakedev-generator:latest
21
+ securityContext :
22
+ runAsUser : 0
23
+ readOnlyRootFilesystem : false
24
+ allowPrivilegeEscalation : false
25
+ # files are generated under CWD
26
+ workingDir : /tmp/fakedev
27
+ volumeMounts :
28
+ - name : devfs
29
+ mountPath : /tmp/fakedev/dev
30
+ readOnly : false
31
+ - name : sysfs
32
+ mountPath : /tmp/fakedev/sys
33
+ readOnly : false
34
+ - name : fake-conf
35
+ mountPath : /config
36
+ readOnly : true
37
+ # generate fake sysfs / devfs files for GPU plugin based on config
38
+ command : ["/generator", "-json", "/config/fakedev.json", "-verbose"]
19
39
- name : intel-gpu-initcontainer
20
40
image : intel/intel-gpu-initcontainer:0.24.0
21
41
imagePullPolicy : IfNotPresent
22
42
securityContext :
23
43
readOnlyRootFilesystem : true
24
44
allowPrivilegeEscalation : false
25
45
volumeMounts :
26
- - mountPath : /etc/kubernetes/node-feature-discovery/source.d/
27
- name : nfd-source-hooks
46
+ - name : sysfs
47
+ mountPath : /host-sys
48
+ readOnly : true
49
+ - name : nfd-features
50
+ mountPath : /nfd
51
+ readOnly : false
52
+ workingDir : /usr/local/bin/gpu-sw
53
+ # convert generated sysfs content to NFD feature labels
54
+ command : ["sh", "-c", "./intel-gpu-nfdhook | tee /nfd/fake-gpu"]
28
55
containers :
29
56
- name : intel-gpu-plugin
30
57
env :
31
58
- name : NODE_NAME
32
59
valueFrom :
33
60
fieldRef :
34
61
fieldPath : spec.nodeName
35
- image : intel/intel-gpu-plugin:0.24.0
36
- imagePullPolicy : IfNotPresent
62
+ image : intel/intel-gpu-plugin:latest
37
63
securityContext :
38
64
readOnlyRootFilesystem : true
39
65
allowPrivilegeEscalation : false
40
66
command : [
41
67
" /usr/local/bin/intel_gpu_device_plugin" ,
42
- " -shared-dev-num" , "300",
68
+ " -shared-dev-num" , "2",
69
+ " -fake-mode" , "/tmp/fakedev,",
43
70
" -enable-monitoring" ,
44
71
" -resource-manager" ,
45
72
" -v" , "2"
46
73
]
47
74
volumeMounts :
75
+ # combined GPU plugin / container runtime limitation:
76
+ # device files need to be mounted to same path on host and inside container
48
77
- name : devfs
49
- mountPath : /dev/dri
78
+ mountPath : /tmp/fakedev/dev
50
79
readOnly : true
51
80
- name : sysfs
52
- mountPath : /sys/class/drm
81
+ mountPath : /tmp/fakedev/sys
53
82
readOnly : true
54
83
- name : kubeletsockets
55
84
mountPath : /var/lib/kubelet/device-plugins
56
85
- name : podresources
57
86
mountPath : /var/lib/kubelet/pod-resources
58
87
volumes :
88
+ - name : fake-conf
89
+ configMap :
90
+ name : fake-gen-config
59
91
- name : devfs
60
92
hostPath :
61
- path : /dev/dri
93
+ path : /tmp/fakedev/dev
94
+ type : DirectoryOrCreate
62
95
- name : sysfs
63
- hostPath :
64
- path : /sys/class/drm
96
+ emptyDir : {}
65
97
- name : kubeletsockets
66
98
hostPath :
67
99
path : /var/lib/kubelet/device-plugins
68
100
- name : podresources
69
101
hostPath :
70
102
path : /var/lib/kubelet/pod-resources
71
- - name : nfd-source-hooks
103
+ - name : nfd-features
72
104
hostPath :
73
- path : /etc/kubernetes/node-feature-discovery/source .d/
105
+ path : /etc/kubernetes/node-feature-discovery/features .d/
74
106
type : DirectoryOrCreate
75
107
nodeSelector :
76
108
kubernetes.io/arch : amd64
0 commit comments