@@ -78,18 +78,6 @@ const (
7878 TrustedCABundleMountDir = "/etc/pki/ca-trust/extracted/pem"
7979 // TrustedCACertificate indicates injected CA certificate name
8080 TrustedCACertificate = "tls-ca-bundle.pem"
81- // VGPULicensingConfigMountPath indicates target mount path for vGPU licensing configuration file
82- VGPULicensingConfigMountPath = "/drivers/gridd.conf"
83- // VGPULicensingFileName is the vGPU licensing configuration filename
84- VGPULicensingFileName = "gridd.conf"
85- // NLSClientTokenMountPath inidicates the target mount path for NLS client config token file (.tok)
86- NLSClientTokenMountPath = "/drivers/ClientConfigToken/client_configuration_token.tok"
87- // NLSClientTokenFileName is the NLS client config token filename
88- NLSClientTokenFileName = "client_configuration_token.tok"
89- // VGPUTopologyConfigMountPath indicates target mount path for vGPU topology daemon configuration file
90- VGPUTopologyConfigMountPath = "/etc/nvidia/nvidia-topologyd.conf"
91- // VGPUTopologyConfigFileName is the vGPU topology daemon configuration filename
92- VGPUTopologyConfigFileName = "nvidia-topologyd.conf"
9381 // DefaultRuntimeClass represents "nvidia" RuntimeClass
9482 DefaultRuntimeClass = "nvidia"
9583 // DriverInstallPathVolName represents volume name for driver install path provided to toolkit
@@ -3329,23 +3317,23 @@ func applyLicensingConfig(obj *appsv1.DaemonSet, config *gpuv1.ClusterPolicySpec
33293317 podSpec := & obj .Spec .Template .Spec
33303318
33313319 // add new volume mount
3332- licensingConfigVolMount := corev1.VolumeMount {Name : "licensing-config" , ReadOnly : true , MountPath : VGPULicensingConfigMountPath , SubPath : VGPULicensingFileName }
3320+ licensingConfigVolMount := corev1.VolumeMount {Name : "licensing-config" , ReadOnly : true , MountPath : consts . VGPULicensingConfigMountPath , SubPath : consts . VGPULicensingFileName }
33333321 driverContainer .VolumeMounts = append (driverContainer .VolumeMounts , licensingConfigVolMount )
33343322
33353323 // gridd.conf always mounted
33363324 licenseItemsToInclude := []corev1.KeyToPath {
33373325 {
3338- Key : VGPULicensingFileName ,
3339- Path : VGPULicensingFileName ,
3326+ Key : consts . VGPULicensingFileName ,
3327+ Path : consts . VGPULicensingFileName ,
33403328 },
33413329 }
33423330 // client config token only mounted when NLS is enabled
33433331 if config .Driver .LicensingConfig .IsNLSEnabled () {
33443332 licenseItemsToInclude = append (licenseItemsToInclude , corev1.KeyToPath {
3345- Key : NLSClientTokenFileName ,
3346- Path : NLSClientTokenFileName ,
3333+ Key : consts . NLSClientTokenFileName ,
3334+ Path : consts . NLSClientTokenFileName ,
33473335 })
3348- nlsTokenVolMount := corev1.VolumeMount {Name : "licensing-config" , ReadOnly : true , MountPath : NLSClientTokenMountPath , SubPath : NLSClientTokenFileName }
3336+ nlsTokenVolMount := corev1.VolumeMount {Name : "licensing-config" , ReadOnly : true , MountPath : consts . NLSClientTokenMountPath , SubPath : consts . NLSClientTokenFileName }
33493337 driverContainer .VolumeMounts = append (driverContainer .VolumeMounts , nlsTokenVolMount )
33503338 }
33513339
@@ -3446,7 +3434,7 @@ func transformDriverContainer(obj *appsv1.DaemonSet, config *gpuv1.ClusterPolicy
34463434
34473435 // set virtual topology daemon configuration if specified for vGPU driver
34483436 if config .Driver .VirtualTopology != nil && config .Driver .VirtualTopology .Config != "" {
3449- topologyConfigVolMount := corev1.VolumeMount {Name : "topology-config" , ReadOnly : true , MountPath : VGPUTopologyConfigMountPath , SubPath : VGPUTopologyConfigFileName }
3437+ topologyConfigVolMount := corev1.VolumeMount {Name : "topology-config" , ReadOnly : true , MountPath : consts . VGPUTopologyConfigMountPath , SubPath : consts . VGPUTopologyConfigFileName }
34503438 driverContainer .VolumeMounts = append (driverContainer .VolumeMounts , topologyConfigVolMount )
34513439
34523440 topologyConfigVolumeSource := corev1.VolumeSource {
@@ -3456,8 +3444,8 @@ func transformDriverContainer(obj *appsv1.DaemonSet, config *gpuv1.ClusterPolicy
34563444 },
34573445 Items : []corev1.KeyToPath {
34583446 {
3459- Key : VGPUTopologyConfigFileName ,
3460- Path : VGPUTopologyConfigFileName ,
3447+ Key : consts . VGPUTopologyConfigFileName ,
3448+ Path : consts . VGPUTopologyConfigFileName ,
34613449 },
34623450 },
34633451 },
0 commit comments