Skip to content

Commit

Permalink
[cherry-pick for release-1.8]Update the default value of parameter wo…
Browse files Browse the repository at this point in the history
…rker-threads-for-podgroup to 5

Signed-off-by: lili <lili_9309@163.com>
  • Loading branch information
Lily922 committed Nov 6, 2023
1 parent 5e92544 commit 982c418
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cmd/controller-manager/app/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const (
defaultSchedulerName = "volcano"
defaultHealthzAddress = ":11251"
defaultLockObjectNamespace = "volcano-system"
defaultPodGroupWorkers = 5
)

// ServerOption is the main context object for the controllers.
Expand Down Expand Up @@ -96,7 +97,7 @@ func (s *ServerOption) AddFlags(fs *pflag.FlagSet) {
fs.StringVar(&s.HealthzBindAddress, "healthz-address", defaultHealthzAddress, "The address to listen on for the health check server.")
fs.BoolVar(&s.EnableHealthz, "enable-healthz", false, "Enable the health check; it is false by default")
fs.BoolVar(&s.InheritOwnerAnnotations, "inherit-owner-annotations", true, "Enable inherit owner annotations for pods when create podgroup; it is enabled by default")
fs.Uint32Var(&s.WorkerThreadsForPG, "worker-threads-for-podgroup", 1, "The number of threads syncing podgroup operations. The larger the number, the faster the podgroup processing, but requires more CPU load.")
fs.Uint32Var(&s.WorkerThreadsForPG, "worker-threads-for-podgroup", defaultPodGroupWorkers, "The number of threads syncing podgroup operations. The larger the number, the faster the podgroup processing, but requires more CPU load.")
}

// CheckOptionOrDie checks the LockObjectNamespace.
Expand Down
2 changes: 1 addition & 1 deletion cmd/controller-manager/app/options/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestAddFlags(t *testing.T) {
InheritOwnerAnnotations: true,
EnableLeaderElection: true,
LockObjectNamespace: defaultLockObjectNamespace,
WorkerThreadsForPG: 1,
WorkerThreadsForPG: 5,
}

if !reflect.DeepEqual(expected, s) {
Expand Down

0 comments on commit 982c418

Please sign in to comment.