Skip to content

Commit

Permalink
Merge pull request #1055 from NVIDIA/gfd-mount-etc-nvidia-imex
Browse files Browse the repository at this point in the history
Make the IMEX nodes config file available to GFD
  • Loading branch information
cdesiniotis authored Oct 22, 2024
2 parents 76fe609 + 5525636 commit 978b020
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
22 changes: 22 additions & 0 deletions assets/gpu-feature-discovery/0500_configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: gpu-feature-discovery-entrypoint
namespace: "FILLED BY THE OPERATOR"
labels:
app: gpu-feature-discovery
data:
entrypoint.sh: |-
#!/bin/bash
until [[ -f /run/nvidia/validations/driver-ready ]]
do
echo "waiting for the driver validations to be ready..."
sleep 5
done
set -o allexport
cat /run/nvidia/validations/driver-ready
. /run/nvidia/validations/driver-ready
exec gpu-feature-discovery
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ spec:
containers:
- image: "FILLED BY THE OPERATOR"
name: gpu-feature-discovery
command: ["gpu-feature-discovery"]
command: [ "/bin/bash", "-c" ]
args:
- /bin/entrypoint.sh
env:
- name: GFD_SLEEP_INTERVAL
value: 60s
Expand All @@ -80,11 +82,24 @@ spec:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: gpu-feature-discovery-entrypoint
readOnly: true
mountPath: /bin/entrypoint.sh
subPath: entrypoint.sh
- name: output-dir
mountPath: "/etc/kubernetes/node-feature-discovery/features.d"
- name: dmi-info-dir
mountPath: "/sys/class/dmi/id"
readOnly: true
- name: run-nvidia-validations
mountPath: /run/nvidia/validations
- name: driver-install-dir
mountPath: /driver-root
mountPropagation: HostToContainer
- name: host-root
mountPath: /host
readOnly: true
mountPropagation: HostToContainer
securityContext:
privileged: true
- image: "FILLED BY THE OPERATOR"
Expand Down Expand Up @@ -116,6 +131,10 @@ spec:
- name: PROCESS_TO_SIGNAL
value: "gpu-feature-discovery"
volumes:
- name: gpu-feature-discovery-entrypoint
configMap:
name: gpu-feature-discovery-entrypoint
defaultMode: 448
- name: output-dir
hostPath:
path: "/etc/kubernetes/node-feature-discovery/features.d"
Expand All @@ -126,3 +145,14 @@ spec:
hostPath:
path: "/run/nvidia"
type: Directory
- name: run-nvidia-validations
hostPath:
path: /run/nvidia/validations
type: DirectoryOrCreate
- name: host-root
hostPath:
path: /
- name: driver-install-dir
hostPath:
path: /run/nvidia/driver
type: DirectoryOrCreate

0 comments on commit 978b020

Please sign in to comment.