From 56878e5c49e36030016999e1db9615ecd642f971 Mon Sep 17 00:00:00 2001 From: Harry Li Date: Tue, 4 Jun 2024 22:15:31 +0800 Subject: [PATCH] fix: typing error --- controllers/object_controls.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/object_controls.go b/controllers/object_controls.go index e8ca046d1..9fd4f4ee9 100644 --- a/controllers/object_controls.go +++ b/controllers/object_controls.go @@ -1254,13 +1254,13 @@ func TransformDevicePlugin(obj *appsv1.DaemonSet, config *gpuv1.ClusterPolicySpe // set/append environment variables for device-plugin container if len(config.DevicePlugin.Env) > 0 { for _, env := range config.DevicePlugin.Env { - setContainerEnv(&(obj.Spec.Template.Spec.Containers[0]), corev1.EnvVar{Name: "env.Name", Value: env.Value}) + setContainerEnv(&(obj.Spec.Template.Spec.Containers[0]), corev1.EnvVar{Name: env.Name, Value: env.Value}) } } // add env to allow injection of /dev/nvidia-fs and /dev/infiniband devices for GDS if config.GPUDirectStorage != nil && config.GPUDirectStorage.IsEnabled() { - setContainerEnv(&(obj.Spec.Template.Spec.Containers[0]), corev1.EnvVar{Name: "GDSEnabledEnvName", Value: "true"}) - setContainerEnv(&(obj.Spec.Template.Spec.Containers[0]), corev1.EnvVar{Name: "MOFEDEnabledEnvName", Value: "true"}) + setContainerEnv(&(obj.Spec.Template.Spec.Containers[0]), corev1.EnvVar{Name: GDSEnabledEnvName, Value: "true"}) + setContainerEnv(&(obj.Spec.Template.Spec.Containers[0]), corev1.EnvVar{Name: MOFEDEnabledEnvName, Value: "true"}) } // apply plugin configuration through ConfigMap if one is provided