-
Notifications
You must be signed in to change notification settings - Fork 0
/
nvgpu.yaml
93 lines (93 loc) · 2.33 KB
/
nvgpu.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
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: fake-device-plugin
namespace: kube-system
labels:
app: fake-device-plugin
spec:
selector:
matchLabels:
app: fake-device-plugin
template:
metadata:
labels:
app: fake-device-plugin
spec:
priorityClassName: system-node-critical
nodeSelector:
fake-device-plugin: 'true'
tolerations:
# Allow this pod to be rescheduled while the node is in "critical add-ons only" mode.
# This, along with the annotation above marks this pod as a critical add-on.
- key: CriticalAddonsOnly
operator: Exists
hostNetwork: true
containers:
- image: yehiyam/fake-device-plugin:0.0.2
name: fake-device-plugin
# args: ["-log-level", "debug"]
# --------- Doug removed this section.
# securityContext:
# allowPrivilegeEscalation: false
# capabilities:
# drop: ["ALL"]
volumeMounts:
- name: device-plugin
mountPath: /var/lib/kubelet/device-plugins
- name: config
mountPath: /dummyResources.json
subPath: dummyResources.json
volumes:
- name: device-plugin
hostPath:
path: /var/lib/kubelet/device-plugins
- name: config
configMap:
name: fake-device-plugin-cm
items:
- key: dummyResources.json
path: dummyResources.json
---
apiVersion: v1
kind: ConfigMap
metadata:
name: fake-device-plugin-cm
namespace: kube-system
data:
dummyResources.json: |
[
{
"name": "dev_1",
"state": "Up"
},
{
"name": "dev_2",
"state": "Up"
},
{
"name": "dev_3",
"state": "Up"
},
{
"name": "dev_4",
"state": "Up"
},
{
"name": "dev_5",
"state": "Up"
},
{
"name": "dev_6",
"state": "Up"
},
{
"name": "dev_7",
"state": "Up"
},
{
"name": "dev_8",
"state": "Up"
}
]