Skip to content

Commit

Permalink
rename algorithm default image flag
Browse files Browse the repository at this point in the history
Signed-off-by: Zach Zhu <zzqshu@126.com>
  • Loading branch information
zqzten committed Oct 19, 2023
1 parent 5bf64c1 commit 7a25c88
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ type algorithmJobConfig struct {
Namespace string
DefaultServiceAccount string
DefaultMetricsServerAddr string
DefaultImagePredictiveHorizontal string
DefaultImageHorizontalPredictive string
}

func main() {
Expand Down Expand Up @@ -155,8 +155,8 @@ func main() {
"The default service account for algorithm jobs.")
flag.StringVar(&algorithmJobConfig.DefaultMetricsServerAddr, "algorithm-job-default-metrics-server-addr", "",
"The default metrics server address to inject to env of algorithm jobs.")
flag.StringVar(&algorithmJobConfig.DefaultImagePredictiveHorizontal, "algorithm-job-default-image-predictive-horizontal", "",
"The default image for algorithm jobs of predictive horizontal portrait.")
flag.StringVar(&algorithmJobConfig.DefaultImageHorizontalPredictive, "algorithm-job-default-image-horizontal-predictive", "",
"The default image for algorithm jobs of horizontal predictive portrait.")
opts := zap.Options{
Development: true,
TimeEncoder: zapcore.RFC3339TimeEncoder,
Expand Down Expand Up @@ -448,8 +448,8 @@ func initExternalHorizontalPortraitAlgorithmJobControllers(client client.Client,
return nil, fmt.Errorf("shall set namespace for algorithm jobs")
}
controllers := make(map[autoscalingv1alpha1.PortraitAlgorithmJobType]jobcontroller.Horizontal)
autoscalingv1alpha1.PredictivePortraitType: config.DefaultImagePredictiveHorizontal,
controllers[autoscalingv1alpha1.CronJobPortraitAlgorithmJobType] = jobcontroller.NewCronJobHorizontal(client, config.Namespace, config.DefaultServiceAccount, config.DefaultMetricsServerAddr, map[autoscalingv1alpha1.PortraitType]string{
autoscalingv1alpha1.PredictivePortraitType: config.DefaultImageHorizontalPredictive,
})
return controllers, nil
}
Expand Down

0 comments on commit 7a25c88

Please sign in to comment.