@@ -77,18 +77,6 @@ const (
7777 TrustedCABundleMountDir = "/etc/pki/ca-trust/extracted/pem"
7878 // TrustedCACertificate indicates injected CA certificate name
7979 TrustedCACertificate = "tls-ca-bundle.pem"
80- // VGPULicensingConfigMountPath indicates target mount path for vGPU licensing configuration file
81- VGPULicensingConfigMountPath = "/drivers/gridd.conf"
82- // VGPULicensingFileName is the vGPU licensing configuration filename
83- VGPULicensingFileName = "gridd.conf"
84- // NLSClientTokenMountPath inidicates the target mount path for NLS client config token file (.tok)
85- NLSClientTokenMountPath = "/drivers/ClientConfigToken/client_configuration_token.tok"
86- // NLSClientTokenFileName is the NLS client config token filename
87- NLSClientTokenFileName = "client_configuration_token.tok"
88- // VGPUTopologyConfigMountPath indicates target mount path for vGPU topology daemon configuration file
89- VGPUTopologyConfigMountPath = "/etc/nvidia/nvidia-topologyd.conf"
90- // VGPUTopologyConfigFileName is the vGPU topology daemon configuration filename
91- VGPUTopologyConfigFileName = "nvidia-topologyd.conf"
9280 // DefaultRuntimeClass represents "nvidia" RuntimeClass
9381 DefaultRuntimeClass = "nvidia"
9482 // DriverInstallPathVolName represents volume name for driver install path provided to toolkit
@@ -3331,23 +3319,23 @@ func applyLicensingConfig(obj *appsv1.DaemonSet, config *gpuv1.ClusterPolicySpec
33313319 podSpec := & obj .Spec .Template .Spec
33323320
33333321 // add new volume mount
3334- licensingConfigVolMount := corev1.VolumeMount {Name : "licensing-config" , ReadOnly : true , MountPath : VGPULicensingConfigMountPath , SubPath : VGPULicensingFileName }
3322+ licensingConfigVolMount := corev1.VolumeMount {Name : "licensing-config" , ReadOnly : true , MountPath : consts . VGPULicensingConfigMountPath , SubPath : consts . VGPULicensingFileName }
33353323 driverContainer .VolumeMounts = append (driverContainer .VolumeMounts , licensingConfigVolMount )
33363324
33373325 // gridd.conf always mounted
33383326 licenseItemsToInclude := []corev1.KeyToPath {
33393327 {
3340- Key : VGPULicensingFileName ,
3341- Path : VGPULicensingFileName ,
3328+ Key : consts . VGPULicensingFileName ,
3329+ Path : consts . VGPULicensingFileName ,
33423330 },
33433331 }
33443332 // client config token only mounted when NLS is enabled
33453333 if config .Driver .LicensingConfig .IsNLSEnabled () {
33463334 licenseItemsToInclude = append (licenseItemsToInclude , corev1.KeyToPath {
3347- Key : NLSClientTokenFileName ,
3348- Path : NLSClientTokenFileName ,
3335+ Key : consts . NLSClientTokenFileName ,
3336+ Path : consts . NLSClientTokenFileName ,
33493337 })
3350- nlsTokenVolMount := corev1.VolumeMount {Name : "licensing-config" , ReadOnly : true , MountPath : NLSClientTokenMountPath , SubPath : NLSClientTokenFileName }
3338+ nlsTokenVolMount := corev1.VolumeMount {Name : "licensing-config" , ReadOnly : true , MountPath : consts . NLSClientTokenMountPath , SubPath : consts . NLSClientTokenFileName }
33513339 driverContainer .VolumeMounts = append (driverContainer .VolumeMounts , nlsTokenVolMount )
33523340 }
33533341
@@ -3448,7 +3436,7 @@ func transformDriverContainer(obj *appsv1.DaemonSet, config *gpuv1.ClusterPolicy
34483436
34493437 // set virtual topology daemon configuration if specified for vGPU driver
34503438 if config .Driver .VirtualTopology != nil && config .Driver .VirtualTopology .Config != "" {
3451- topologyConfigVolMount := corev1.VolumeMount {Name : "topology-config" , ReadOnly : true , MountPath : VGPUTopologyConfigMountPath , SubPath : VGPUTopologyConfigFileName }
3439+ topologyConfigVolMount := corev1.VolumeMount {Name : "topology-config" , ReadOnly : true , MountPath : consts . VGPUTopologyConfigMountPath , SubPath : consts . VGPUTopologyConfigFileName }
34523440 driverContainer .VolumeMounts = append (driverContainer .VolumeMounts , topologyConfigVolMount )
34533441
34543442 topologyConfigVolumeSource := corev1.VolumeSource {
@@ -3458,8 +3446,8 @@ func transformDriverContainer(obj *appsv1.DaemonSet, config *gpuv1.ClusterPolicy
34583446 },
34593447 Items : []corev1.KeyToPath {
34603448 {
3461- Key : VGPUTopologyConfigFileName ,
3462- Path : VGPUTopologyConfigFileName ,
3449+ Key : consts . VGPUTopologyConfigFileName ,
3450+ Path : consts . VGPUTopologyConfigFileName ,
34633451 },
34643452 },
34653453 },
0 commit comments