Skip to content

Commit 0b7ae0f

Browse files
committed
Add example deployment for MIG config support
Signed-off-by: Michail Resvanis <mresvani@redhat.com>
1 parent ae6b1a2 commit 0b7ae0f

File tree

1 file changed

+119
-0
lines changed

1 file changed

+119
-0
lines changed
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---
2+
apiVersion: apps/v1
3+
kind: DaemonSet
4+
metadata:
5+
name: vgpu-device-manager
6+
namespace: default
7+
labels:
8+
app: vgpu-device-manager
9+
spec:
10+
selector:
11+
matchLabels:
12+
app: vgpu-device-manager
13+
template:
14+
metadata:
15+
labels:
16+
app: vgpu-device-manager
17+
spec:
18+
serviceAccount: vgpu-device-manager
19+
serviceAccountName: vgpu-device-manager
20+
containers:
21+
- name: vgpu-device-manager
22+
image: nvcr.io/nvidia/cloud-native/vgpu-device-manager:v0.1.0
23+
imagePullPolicy: IfNotPresent
24+
env:
25+
- name: NAMESPACE
26+
value: "gpu-operator"
27+
- name: NODE_NAME
28+
valueFrom:
29+
fieldRef:
30+
fieldPath: spec.nodeName
31+
- name: CONFIG_FILE
32+
value: "/vgpu-devices-config/config.yaml"
33+
- name: DEFAULT_VGPU_CONFIG
34+
value: "default"
35+
- name: MIG_PARTED_CONFIG_FILE
36+
value: "/mig-parted-config/config.yaml"
37+
- name: GPU_CLIENTS_FILE
38+
value: "/gpu-clients/clients.yaml"
39+
- name: LD_PRELOAD
40+
value: "/driver-root/usr/lib64/libnvidia-ml.so.1"
41+
securityContext:
42+
privileged: true
43+
volumeMounts:
44+
- mountPath: /vgpu-devices-config
45+
name: vgpu-devices-config
46+
- mountPath: /mig-parted-config
47+
name: mig-parted-config
48+
mountPropagation: HostToContainer
49+
- mountPath: /gpu-clients
50+
name: gpu-clients
51+
- name: driver-install-dir
52+
mountPath: /driver-root
53+
mountPropagation: HostToContainer
54+
- mountPath: /sys
55+
name: host-sys
56+
volumes:
57+
- name: vgpu-devices-config
58+
configMap:
59+
name: vgpu-devices-config
60+
- name: mig-parted-config
61+
configMap:
62+
name: mig-parted-config
63+
- name: gpu-clients
64+
configMap:
65+
name: gpu-clients
66+
- name: driver-install-dir
67+
hostPath:
68+
path: "/run/nvidia/driver"
69+
type: DirectoryOrCreate
70+
- name: host-sys
71+
hostPath:
72+
path: /sys
73+
type: Directory
74+
75+
---
76+
apiVersion: v1
77+
kind: ServiceAccount
78+
metadata:
79+
name: vgpu-device-manager
80+
namespace: default
81+
82+
---
83+
apiVersion: rbac.authorization.k8s.io/v1
84+
kind: ClusterRole
85+
metadata:
86+
name: vgpu-device-manager
87+
rules:
88+
- apiGroups:
89+
- config.openshift.io
90+
resources:
91+
- clusterversions
92+
verbs:
93+
- get
94+
- list
95+
- apiGroups:
96+
- ""
97+
resources:
98+
- nodes
99+
- pods
100+
- pods/eviction
101+
verbs:
102+
- get
103+
- list
104+
- watch
105+
- update
106+
107+
---
108+
apiVersion: rbac.authorization.k8s.io/v1
109+
kind: ClusterRoleBinding
110+
metadata:
111+
name: vgpu-device-manager
112+
roleRef:
113+
apiGroup: rbac.authorization.k8s.io
114+
kind: ClusterRole
115+
name: vgpu-device-manager
116+
subjects:
117+
- kind: ServiceAccount
118+
name: vgpu-device-manager
119+
namespace: default

0 commit comments

Comments
 (0)