Skip to content

Commit

Permalink
fix: typing error
Browse files Browse the repository at this point in the history
  • Loading branch information
mayooot committed Jun 4, 2024
1 parent ab8285a commit 56878e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controllers/object_controls.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 56878e5

Please sign in to comment.