-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmultitenancy-configmap.yml
87 lines (79 loc) · 2.32 KB
/
multitenancy-configmap.yml
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
# Example HostProcess DaemonSets for the MCDM device plugin and the WDDM device plugin, using settings that enable multitenancy
#
# This version of the DaemonSets uses a ConfigMap to provide configuration values. For a version that sets environment variable
# values directly in the Pod spec, see the file `multitenancy-inline.yml`
apiVersion: v1
kind: ConfigMap
metadata:
name: device-plugin-config
data:
# Configure the device plugins to allow 4 containers to mount each device simultaneously
multitenancy: '4'
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: device-plugin-mcdm
spec:
selector:
matchLabels:
app: device-plugin-mcdm
template:
metadata:
labels:
app: device-plugin-mcdm
spec:
nodeSelector:
kubernetes.io/os: 'windows'
kubernetes.io/arch: 'amd64'
node.kubernetes.io/windows-build: '10.0.20348'
securityContext:
windowsOptions:
hostProcess: true
runAsUserName: "NT AUTHORITY\\SYSTEM"
hostNetwork: true
containers:
- name: device-plugin-mcdm
image: "index.docker.io/tensorworks/mcdm-device-plugin:0.0.1"
imagePullPolicy: Always
# Use the configuration values from the ConfigMap
env:
- name: MCDM_DEVICE_PLUGIN_MULTITENANCY
valueFrom:
configMapKeyRef:
name: device-plugin-config
key: multitenancy
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: device-plugin-wddm
spec:
selector:
matchLabels:
app: device-plugin-wddm
template:
metadata:
labels:
app: device-plugin-wddm
spec:
nodeSelector:
kubernetes.io/os: 'windows'
kubernetes.io/arch: 'amd64'
node.kubernetes.io/windows-build: '10.0.20348'
securityContext:
windowsOptions:
hostProcess: true
runAsUserName: "NT AUTHORITY\\SYSTEM"
hostNetwork: true
containers:
- name: device-plugin-wddm
image: "index.docker.io/tensorworks/wddm-device-plugin:0.0.1"
imagePullPolicy: Always
# Use the configuration values from the ConfigMap
env:
- name: WDDM_DEVICE_PLUGIN_MULTITENANCY
valueFrom:
configMapKeyRef:
name: device-plugin-config
key: multitenancy