@@ -80,7 +80,7 @@ var clusterLevelPortRange string
8080var enableAlert bool
8181var alertManagerAddr string
8282var timeSeriesDB * metrics.TimeSeriesDB
83- var configPath string
83+ var dynamicConfigPath string
8484var globalConfig config.GlobalConfig
8585var alertEvaluator * alert.AlertEvaluator
8686
@@ -104,8 +104,8 @@ func main() {
104104 "If set, HTTP/2 will be enabled for the metrics and webhook servers" )
105105 flag .StringVar (& gpuInfoConfig , "gpu-info-config" ,
106106 "/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" )
109109 flag .StringVar (& metricsPath , "metrics-path" , "/logs/metrics.log" , "specify the path to metrics file" )
110110 flag .StringVar (& nodeLevelPortRange , "host-port-range" , "40000-42000" ,
111111 "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
412412
413413 alertEvaluator = alert .NewAlertEvaluator (ctx , timeSeriesDB , globalConfig .AlertRules , alertManagerAddr )
414414
415- ch , err := utils .WatchConfigFileChanges (ctx , configPath )
415+ ch , err := utils .WatchConfigFileChanges (ctx , dynamicConfigPath )
416416 if err != nil {
417417 ctrl .Log .Error (err , "unable to watch global config file, file may not exist" ,
418- "configPath" , configPath )
418+ "configPath" , dynamicConfigPath )
419419 return
420420 }
421421
@@ -424,7 +424,7 @@ func setupTimeSeriesAndWatchGlobalConfigChanges(ctx context.Context, mgr manager
424424 err := yaml .Unmarshal (data , & globalConfig )
425425 if err != nil {
426426 ctrl .Log .Error (err , "unable to reload global config file, not valid config structure" ,
427- "configPath" , configPath )
427+ "configPath" , dynamicConfigPath )
428428 continue
429429 }
430430
@@ -433,7 +433,7 @@ func setupTimeSeriesAndWatchGlobalConfigChanges(ctx context.Context, mgr manager
433433 if alertCanBeEnabled && enableAlert {
434434 err = alertEvaluator .UpdateAlertRules (globalConfig .AlertRules )
435435 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 )
437437 }
438438 }
439439 }()
0 commit comments