Skip to content

Commit

Permalink
allow users define controller workers
Browse files Browse the repository at this point in the history
Signed-off-by: mingzhou.swx <[email protected]>
  • Loading branch information
mingzhou.swx committed Aug 23, 2022
1 parent 65b75a6 commit c8baf73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/controller/batchrelease/batchrelease_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ var (
)

func init() {
flag.IntVar(&concurrentReconciles, "batchrelease-workers", 3, "Max concurrent workers for batchRelease controller.")

watchedWorkload = sync.Map{}
watchedWorkload.LoadOrStore(util.ControllerKindDep.String(), struct{}{})
watchedWorkload.LoadOrStore(util.ControllerKindSts.String(), struct{}{})
Expand Down
3 changes: 3 additions & 0 deletions pkg/controller/rollout/rollout_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package rollout

import (
"context"
"flag"
"sync"
"time"

Expand All @@ -42,6 +43,8 @@ var (
)

func init() {
flag.IntVar(&concurrentReconciles, "rollout-workers", 3, "Max concurrent workers for rollout controller.")

watchedWorkload = sync.Map{}
watchedWorkload.LoadOrStore(util.ControllerKindDep.String(), struct{}{})
watchedWorkload.LoadOrStore(util.ControllerKindSts.String(), struct{}{})
Expand Down

0 comments on commit c8baf73

Please sign in to comment.