-
Notifications
You must be signed in to change notification settings - Fork 904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
introduce concurrent flags to controllers #1321
Conversation
if numbers of objects are huge,controller can't proccess them in time.In my case, pp objects get reconciled after serveral minutes. |
/release-note-none |
d5b1bf8
to
f304d9b
Compare
/priority important-soon |
Refer to #1260 |
Hi @pigletfly, what about make it easier by using controllerManager, err := controllerruntime.NewManager(config, controllerruntime.Options{
Scheme: gclient.NewSchema(),
SyncPeriod: &opts.ResyncPeriod.Duration,
LeaderElection: opts.LeaderElection.LeaderElect,
LeaderElectionID: opts.LeaderElection.ResourceName,
LeaderElectionNamespace: opts.LeaderElection.ResourceNamespace,
LeaderElectionResourceLock: opts.LeaderElection.ResourceLock,
HealthProbeBindAddress: net.JoinHostPort(opts.BindAddress, strconv.Itoa(opts.SecurePort)),
LivenessEndpointName: "/healthz",
Controller: v1alpha1.ControllerConfigurationSpec{
GroupKindConcurrency: map[string]int{
workv1alpha2.SchemeGroupVersion.WithKind("ResourceBinding"): rbConcurrentReconciles,
workv1alpha2.SchemeGroupVersion.WithKind("ClusterResourceBinding"): crbConcurrentReconciles,
workv1alpha1.SchemeGroupVersion.WithKind("Work"): workConcurrentReconciles,
......
},
},
}) |
that's fine with normal controllers (e.g,ResourceBinding) except detector,work,cluster. |
1d3cf23
to
037df3b
Compare
037df3b
to
98238e6
Compare
@Garrybest @RainbowMango PTAL |
I think you may forget this. karmada/pkg/detector/detector.go Line 97 in b5493cc
|
good catch.But resourcebinding shares the same flag,we can't redefined in detector.Or we can hack like this xref #1309 |
673936c
to
34aed67
Compare
96f65f2
to
fb0c3a6
Compare
Signed-off-by: pigletfly <[email protected]>
fb0c3a6
to
957be91
Compare
afbc682
to
fe0e02b
Compare
fe0e02b
to
ff36d70
Compare
Signed-off-by: RainbowMango <[email protected]>
b0c3e07
to
3f0aa79
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we are good to go now.
@dddddai @Garrybest
Could you please take a look?
/lgtm |
Nice work👍 |
/retitle introduce concurrent flags to controllers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: pigletfly [email protected]
What type of PR is this?
/kind feature
What this PR does / why we need it:
Make controller reconcile concurrent configurable
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: