Skip to content

Commit 978b020

Browse files
authored
Merge pull request #1055 from NVIDIA/gfd-mount-etc-nvidia-imex
Make the IMEX nodes config file available to GFD
2 parents 76fe609 + 5525636 commit 978b020

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: gpu-feature-discovery-entrypoint
5+
namespace: "FILLED BY THE OPERATOR"
6+
labels:
7+
app: gpu-feature-discovery
8+
data:
9+
entrypoint.sh: |-
10+
#!/bin/bash
11+
12+
until [[ -f /run/nvidia/validations/driver-ready ]]
13+
do
14+
echo "waiting for the driver validations to be ready..."
15+
sleep 5
16+
done
17+
18+
set -o allexport
19+
cat /run/nvidia/validations/driver-ready
20+
. /run/nvidia/validations/driver-ready
21+
22+
exec gpu-feature-discovery

assets/gpu-feature-discovery/0500_daemonset.yaml renamed to assets/gpu-feature-discovery/0600_daemonset.yaml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ spec:
6565
containers:
6666
- image: "FILLED BY THE OPERATOR"
6767
name: gpu-feature-discovery
68-
command: ["gpu-feature-discovery"]
68+
command: [ "/bin/bash", "-c" ]
69+
args:
70+
- /bin/entrypoint.sh
6971
env:
7072
- name: GFD_SLEEP_INTERVAL
7173
value: 60s
@@ -80,11 +82,24 @@ spec:
8082
fieldRef:
8183
fieldPath: spec.nodeName
8284
volumeMounts:
85+
- name: gpu-feature-discovery-entrypoint
86+
readOnly: true
87+
mountPath: /bin/entrypoint.sh
88+
subPath: entrypoint.sh
8389
- name: output-dir
8490
mountPath: "/etc/kubernetes/node-feature-discovery/features.d"
8591
- name: dmi-info-dir
8692
mountPath: "/sys/class/dmi/id"
8793
readOnly: true
94+
- name: run-nvidia-validations
95+
mountPath: /run/nvidia/validations
96+
- name: driver-install-dir
97+
mountPath: /driver-root
98+
mountPropagation: HostToContainer
99+
- name: host-root
100+
mountPath: /host
101+
readOnly: true
102+
mountPropagation: HostToContainer
88103
securityContext:
89104
privileged: true
90105
- image: "FILLED BY THE OPERATOR"
@@ -116,6 +131,10 @@ spec:
116131
- name: PROCESS_TO_SIGNAL
117132
value: "gpu-feature-discovery"
118133
volumes:
134+
- name: gpu-feature-discovery-entrypoint
135+
configMap:
136+
name: gpu-feature-discovery-entrypoint
137+
defaultMode: 448
119138
- name: output-dir
120139
hostPath:
121140
path: "/etc/kubernetes/node-feature-discovery/features.d"
@@ -126,3 +145,14 @@ spec:
126145
hostPath:
127146
path: "/run/nvidia"
128147
type: Directory
148+
- name: run-nvidia-validations
149+
hostPath:
150+
path: /run/nvidia/validations
151+
type: DirectoryOrCreate
152+
- name: host-root
153+
hostPath:
154+
path: /
155+
- name: driver-install-dir
156+
hostPath:
157+
path: /run/nvidia/driver
158+
type: DirectoryOrCreate

0 commit comments

Comments
 (0)