Skip to content

Commit

Permalink
server: Make threadiness configurable
Browse files Browse the repository at this point in the history
Signed-off-by: Ce Gao <[email protected]>
  • Loading branch information
gaocegege committed Jun 14, 2018
1 parent 4634c93 commit c3b785d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/tf-operator.v2/app/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (s *ServerOption) AddFlags(fs *flag.FlagSet) {
`The url of the Kubernetes API server,
will overrides any value in kubeconfig, only required if out-of-cluster.`)

fs.IntVar(&s.Threadiness, "threadiness", 2,
fs.IntVar(&s.Threadiness, "threadiness", 1,
`How many threads to process the main logic`)

fs.BoolVar(&s.PrintVersion, "version", false, "Show version and quit")
Expand Down
2 changes: 1 addition & 1 deletion cmd/tf-operator.v2/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func Run(opt *options.ServerOption) error {

// Set leader election start function.
run := func(<-chan struct{}) {
if err := tc.Run(1, stopCh); err != nil {
if err := tc.Run(opt.Threadiness, stopCh); err != nil {
log.Errorf("Failed to run the controller: %v", err)
}
}
Expand Down

0 comments on commit c3b785d

Please sign in to comment.