File tree Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ const (
1616
1717 NvidiaOperatorProgressiveMigrationEnv = "NVIDIA_OPERATOR_PROGRESSIVE_MIGRATION"
1818 RunHypervisorUtilGPUAllocatable = "RUN_HYPERVISOR_UTIL_GPU_ALLOCATABLE"
19+
20+ UsingCommercialComponentEnv = "COMMERCIAL_PLAN"
1921)
2022
2123// General envs used in compose components manifest
Original file line number Diff line number Diff line change @@ -338,11 +338,15 @@ func AddTFDefaultClientConfBeforePatch(
338338 }, v1.EnvVar {
339339 Name : constants .HypervisorPortEnv ,
340340 Value : strconv .Itoa (int (getHypervisorPortNumber (pool .Spec .ComponentConfig .Hypervisor ))),
341- }, v1.EnvVar {
342- Name : constants .NGPUPathEnv ,
343- Value : constants .NGPUPathValue ,
344341 })
345342
343+ if IsLicensed () {
344+ envList = append (envList , v1.EnvVar {
345+ Name : constants .NGPUPathEnv ,
346+ Value : constants .NGPUPathValue ,
347+ })
348+ }
349+
346350 // disable GPU limiter killer switch
347351 if pod .Annotations [constants .DisableFeaturesAnnotation ] != "" {
348352 envList = convertDisabledFeaturesToEnvs (pod .Annotations [constants .DisableFeaturesAnnotation ], envList )
Original file line number Diff line number Diff line change @@ -166,7 +166,19 @@ func GetSelfServiceAccountNameShort() string {
166166 return parts [len (parts )- 1 ]
167167}
168168
169- var nvidiaOperatorProgressiveMigrationEnv = os .Getenv (constants .NvidiaOperatorProgressiveMigrationEnv ) == "true"
169+ var nvidiaOperatorProgressiveMigrationEnv = os .Getenv (constants .NvidiaOperatorProgressiveMigrationEnv ) == constants .TrueStringValue
170+
171+ var isLicensedEnv = os .Getenv (constants .UsingCommercialComponentEnv ) == constants .TrueStringValue
172+
173+ func init () {
174+ if isLicensedEnv {
175+ ctrl .
Log .
Info (
"Enabling none open source components, please make sure you are in trial stage or have bought commercial license. Contact us: [email protected] " )
176+ }
177+ }
178+
179+ func IsLicensed () bool {
180+ return isLicensedEnv
181+ }
170182
171183func IsProgressiveMigration () bool {
172184 return nvidiaOperatorProgressiveMigrationEnv
You can’t perform that action at this time.
0 commit comments