Skip to content

Commit 09edc57

Browse files
committed
increase max concurrent reconciles; refactoring
1 parent 3255383 commit 09edc57

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pkg/component/reconciler.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ type ReconcilerOptions struct {
8686
// If unspecified, UpdatePolicyReplace is assumed.
8787
// Can be overridden by annotation on object level.
8888
UpdatePolicy *reconciler.UpdatePolicy
89-
// Schemebuilder allows to define additional schemes to be made available in the
89+
// SchemeBuilder allows to define additional schemes to be made available in the
9090
// target client.
9191
SchemeBuilder types.SchemeBuilder
9292
}
@@ -501,7 +501,7 @@ func (r *Reconciler[T]) SetupWithManager(mgr ctrl.Manager) error {
501501
return r.SetupWithManagerAndBuilder(
502502
mgr,
503503
ctrl.NewControllerManagedBy(mgr).
504-
WithOptions(controller.Options{MaxConcurrentReconciles: 3}),
504+
WithOptions(controller.Options{MaxConcurrentReconciles: 5}),
505505
)
506506
}
507507

@@ -519,8 +519,7 @@ func (r *Reconciler[T]) getClientForComponent(component T) (cluster.Client, erro
519519
if haveImpersonationConfiguration {
520520
impersonationUser = impersonationConfiguration.GetImpersonationUser()
521521
impersonationGroups = impersonationConfiguration.GetImpersonationGroups()
522-
r := regexp.MustCompile(`^(system:serviceaccount):(.*):(.+)$`)
523-
if m := r.FindStringSubmatch(impersonationUser); m != nil {
522+
if m := regexp.MustCompile(`^(system:serviceaccount):(.*):(.+)$`).FindStringSubmatch(impersonationUser); m != nil {
524523
if m[2] == "" {
525524
namespace := ""
526525
if havePlacementConfiguration {

0 commit comments

Comments
 (0)