Skip to content

Commit

Permalink
feat(controller): Add --qps and --burst flags to controller (#3180)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexec committed Jun 8, 2020
1 parent b86949f commit f1cdba1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/workflow-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ func NewRootCommand() *cobra.Command {
glogLevel int // --gloglevel
workflowWorkers int // --workflow-workers
podWorkers int // --pod-workers
burst int
qps float32
namespaced bool // --namespaced
managedNamespace string // --managed-namespace
)
Expand All @@ -57,8 +59,8 @@ func NewRootCommand() *cobra.Command {
if err != nil {
return err
}
config.Burst = 30
config.QPS = 20.0
config.Burst = burst
config.QPS = qps

namespace, _, err := clientConfig.Namespace()
if err != nil {
Expand Down Expand Up @@ -98,6 +100,8 @@ func NewRootCommand() *cobra.Command {
command.Flags().IntVar(&glogLevel, "gloglevel", 0, "Set the glog logging level")
command.Flags().IntVar(&workflowWorkers, "workflow-workers", 32, "Number of workflow workers")
command.Flags().IntVar(&podWorkers, "pod-workers", 32, "Number of pod workers")
command.Flags().IntVar(&burst, "burst", 30, "Maximum burst for throttle.")
command.Flags().Float32Var(&qps, "qps", 20.0, "Queries per second")
command.Flags().BoolVar(&namespaced, "namespaced", false, "run workflow-controller as namespaced mode")
command.Flags().StringVar(&managedNamespace, "managed-namespace", "", "namespace that workflow-controller watches, default to the installation namespace")
return &command
Expand Down
1 change: 1 addition & 0 deletions docs/scaling.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ You can scale the controller vertically:

- If you have workflows with many steps, increase `--pod-workers`.
- If you have many workflows, increase `--workflow-workers`.
- Increase both `--qps` and `--burst`.

You will need to increase the controller's memory and CPU.

Expand Down

0 comments on commit f1cdba1

Please sign in to comment.