allow users define controller workers (#67)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com> Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com> Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
This commit is contained in:
parent
65b75a6615
commit
3d1df9c315
|
|
@ -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{}{})
|
||||
|
|
@ -62,10 +64,6 @@ func init() {
|
|||
|
||||
const ReleaseFinalizer = "rollouts.kruise.io/batch-release-finalizer"
|
||||
|
||||
func init() {
|
||||
flag.IntVar(&concurrentReconciles, "batchrelease-workers", concurrentReconciles, "Max concurrent workers for BatchRelease controller.")
|
||||
}
|
||||
|
||||
// Add creates a new Rollout Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller
|
||||
// and Start it when the Manager is Started.
|
||||
func Add(mgr manager.Manager) error {
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ package rollout
|
|||
|
||||
import (
|
||||
"context"
|
||||
"flag"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
|
|
@ -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{}{})
|
||||
|
|
|
|||
Loading…
Reference in New Issue