@@ -99,7 +99,7 @@ var alertEvaluator *alert.AlertEvaluator
9999var schedulerConfigPath string
100100var alertEvaluatorReady chan struct {}
101101var enableAutoExpander bool
102- var compatibleWithNvidiaOperator bool
102+ var compatibleWithNvidiaContainerToolkit bool
103103
104104func init () {
105105 utilruntime .Must (clientgoscheme .AddToScheme (scheme ))
@@ -151,16 +151,11 @@ func main() {
151151 "refer https://prometheus.io/docs/alerting/latest/configuration" )
152152 flag .BoolVar (& enableAutoExpander , "enable-auto-expander" , false , "if turn on auto expander, " +
153153 "TensorFusion will auto expand Nodes then Pending Pods which caused by insufficient GPU resources found" )
154- flag .BoolVar (& compatibleWithNvidiaOperator , "compatible-with-nvidia-operator " , false ,
155- "if enabled, node discovery will wait for NVIDIA GPU Operator toolkit-ready validation before starting" )
154+ flag .BoolVar (& compatibleWithNvidiaContainerToolkit , "compatible-with-nvidia-container-toolkit " , false ,
155+ "if enabled, node discovery will wait for NVIDIA Container Toolkit toolkit-ready validation before starting" )
156156
157157 klog .InitFlags (nil )
158158 flag .Parse ()
159-
160- // Set environment variable for utils package to read
161- if compatibleWithNvidiaOperator {
162- _ = os .Setenv (constants .CompatibleWithNvidiaOperatorEnv , constants .TrueStringValue )
163- }
164159 ctrl .SetLogger (klog .NewKlogr ())
165160 ctx := context .Background ()
166161
@@ -401,11 +396,12 @@ func startCustomResourceController(
401396 }
402397
403398 if err = (& controller.GPUNodeReconciler {
404- Client : mgr .GetClient (),
405- Scheme : mgr .GetScheme (),
406- Recorder : mgr .GetEventRecorderFor ("GPUNode" ),
407- Allocator : allocator ,
408- Expander : nodeExpander ,
399+ Client : mgr .GetClient (),
400+ Scheme : mgr .GetScheme (),
401+ Recorder : mgr .GetEventRecorderFor ("GPUNode" ),
402+ Allocator : allocator ,
403+ Expander : nodeExpander ,
404+ CompatibleWithNvidiaContainerToolkit : compatibleWithNvidiaContainerToolkit ,
409405 }).SetupWithManager (mgr ); err != nil {
410406 setupLog .Error (err , "unable to create controller" , "controller" , "GPUNode" )
411407 os .Exit (1 )
0 commit comments