From 7a473f45c6c8deb1e8e921bae18c52407f1e527b Mon Sep 17 00:00:00 2001 From: chaunceyjiang Date: Wed, 29 May 2024 15:47:50 +0800 Subject: [PATCH] Add an initcontainer to device-plugin Signed-off-by: chaunceyjiang --- .../device-plugin/daemonsetnvidia.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/charts/hami/templates/device-plugin/daemonsetnvidia.yaml b/charts/hami/templates/device-plugin/daemonsetnvidia.yaml index ae7cf694f..cd3618e3e 100644 --- a/charts/hami/templates/device-plugin/daemonsetnvidia.yaml +++ b/charts/hami/templates/device-plugin/daemonsetnvidia.yaml @@ -35,6 +35,25 @@ spec: priorityClassName: system-node-critical hostPID: true hostNetwork: true + initContainers: + - args: + - nvidia-validator + command: + - sh + - -c + env: + - name: WITH_WAIT + value: "true" + - name: COMPONENT + value: driver + image: nvcr.m.daocloud.io/nvidia/cloud-native/gpu-operator-validator:v23.9.0 + imagePullPolicy: IfNotPresent + name: driver-validation + resources: { } + securityContext: + privileged: true + seLinuxOptions: + level: s0 containers: - name: device-plugin image: {{ .Values.devicePlugin.image }}:{{ .Values.version }}