@@ -80,7 +80,7 @@ var clusterLevelPortRange string
80
80
var enableAlert bool
81
81
var alertManagerAddr string
82
82
var timeSeriesDB * metrics.TimeSeriesDB
83
- var configPath string
83
+ var dynamicConfigPath string
84
84
var globalConfig config.GlobalConfig
85
85
var alertEvaluator * alert.AlertEvaluator
86
86
@@ -104,8 +104,8 @@ func main() {
104
104
"If set, HTTP/2 will be enabled for the metrics and webhook servers" )
105
105
flag .StringVar (& gpuInfoConfig , "gpu-info-config" ,
106
106
"/etc/tensor-fusion/gpu-info.yaml" , "specify the path to gpuInfoConfig file" )
107
- flag .StringVar (& configPath , "alert-rule -config" ,
108
- "/etc/tensor-fusion/rules .yaml" , "specify the path to alertRuleConfig file" )
107
+ flag .StringVar (& dynamicConfigPath , "dynamic -config" ,
108
+ "/etc/tensor-fusion/config .yaml" , "specify the path to dynamic config file" )
109
109
flag .StringVar (& metricsPath , "metrics-path" , "/logs/metrics.log" , "specify the path to metrics file" )
110
110
flag .StringVar (& nodeLevelPortRange , "host-port-range" , "40000-42000" ,
111
111
"specify the port range for assigning ports to pre-scheduled Pods such as vGPU workers" )
@@ -412,10 +412,10 @@ func setupTimeSeriesAndWatchGlobalConfigChanges(ctx context.Context, mgr manager
412
412
413
413
alertEvaluator = alert .NewAlertEvaluator (ctx , timeSeriesDB , globalConfig .AlertRules , alertManagerAddr )
414
414
415
- ch , err := utils .WatchConfigFileChanges (ctx , configPath )
415
+ ch , err := utils .WatchConfigFileChanges (ctx , dynamicConfigPath )
416
416
if err != nil {
417
417
ctrl .Log .Error (err , "unable to watch global config file, file may not exist" ,
418
- "configPath" , configPath )
418
+ "configPath" , dynamicConfigPath )
419
419
return
420
420
}
421
421
@@ -424,7 +424,7 @@ func setupTimeSeriesAndWatchGlobalConfigChanges(ctx context.Context, mgr manager
424
424
err := yaml .Unmarshal (data , & globalConfig )
425
425
if err != nil {
426
426
ctrl .Log .Error (err , "unable to reload global config file, not valid config structure" ,
427
- "configPath" , configPath )
427
+ "configPath" , dynamicConfigPath )
428
428
continue
429
429
}
430
430
@@ -433,7 +433,7 @@ func setupTimeSeriesAndWatchGlobalConfigChanges(ctx context.Context, mgr manager
433
433
if alertCanBeEnabled && enableAlert {
434
434
err = alertEvaluator .UpdateAlertRules (globalConfig .AlertRules )
435
435
if err != nil {
436
- ctrl .Log .Error (err , "unable to update alert rules" , "configPath" , configPath )
436
+ ctrl .Log .Error (err , "unable to update alert rules" , "configPath" , dynamicConfigPath )
437
437
}
438
438
}
439
439
}()
0 commit comments