diff --git a/main.go b/main.go index b80b30ec989a1fd32d8502f8bab6ce1afa765c29..e8aff474f15961d44846f5d825fe400579d7076a 100644 --- a/main.go +++ b/main.go @@ -39,6 +39,8 @@ var ( FlagConfigMapName = "configmap-name" FlagHelperPodFile = "helper-pod-file" DefaultHelperPodFile = "helperPod.yaml" + FlagWorkerThreads = "worker-threads" + DefaultWorkerThreads = 4 ) func cmdNotFound(c *cli.Context, command string) { @@ -107,6 +109,11 @@ func StartCmd() cli.Command { Usage: "Paths to the Helper pod yaml file", Value: "", }, + cli.IntFlag{ + Name: FlagWorkerThreads, + Usage: "Number of provisioner worker threads.", + Value: DefaultWorkerThreads, + }, }, Action: func(c *cli.Context) { if err := startDaemon(c); err != nil { @@ -232,6 +239,7 @@ func startDaemon(c *cli.Context) error { provisioner, serverVersion.GitVersion, pvController.LeaderElection(false), + pvController.Threadiness(c.Int(FlagWorkerThreads)), ) logrus.Debug("Provisioner started") pc.Run(stopCh)