Skip to content
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

fix(server setup): Added MaxConcurrentReconciles to server manager setup #275

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion internal/controller/compute/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ func Setup(mgr ctrl.Manager, opts *utils.ConfigurationOptions) error {
return ctrl.NewControllerManagedBy(mgr).
Named(name).
WithOptions(controller.Options{
Copy link
Contributor

@cristiGuranIonos cristiGuranIonos Nov 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think opts.CtrlOpts.ForControllerRuntime() can be used too. But this works as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find I didn't see that method, I think it would be wise to use that instead so that if anything new is added in future they get picked up by default. Did you want me to edit all the other resources as well or leave it just as server for now?

RateLimiter: ratelimiter.NewController(),
MaxConcurrentReconciles: opts.CtrlOpts.MaxConcurrentReconciles,
RateLimiter: ratelimiter.NewController(),
}).
For(&v1alpha1.Server{}).
Complete(managed.NewReconciler(mgr,
Expand Down
Loading