diff --git a/main.go b/main.go index d8c93da..0a89a6e 100644 --- a/main.go +++ b/main.go @@ -98,7 +98,7 @@ type algorithmJobConfig struct { Namespace string DefaultServiceAccount string DefaultMetricsServerAddr string - DefaultImagePredictiveHorizontal string + DefaultImageHorizontalPredictive string } func main() { @@ -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, @@ -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 }