Skip to content

Commit 49d55d7

Browse files
authored
Merge pull request #2502 from okozachenko1203/patch-1
🐛 fix openstackserver controller concurrency
2 parents 26a81e0 + c0e4d17 commit 49d55d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

controllers/openstackserver_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func patchServer(ctx context.Context, patchHelper *patch.Helper, openStackServer
170170
return patchHelper.Patch(ctx, openStackServer, options...)
171171
}
172172

173-
func (r *OpenStackServerReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, _ controller.Options) error {
173+
func (r *OpenStackServerReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error {
174174
const imageRefPath = "spec.image.imageRef.name"
175175

176176
log := ctrl.LoggerFrom(ctx)
@@ -190,6 +190,7 @@ func (r *OpenStackServerReconciler) SetupWithManager(ctx context.Context, mgr ct
190190
}
191191

192192
return ctrl.NewControllerManagedBy(mgr).
193+
WithOptions(options).
193194
For(&infrav1alpha1.OpenStackServer{}).
194195
Watches(&orcv1alpha1.Image{},
195196
handler.EnqueueRequestsFromMapFunc(func(ctx context.Context, obj client.Object) []reconcile.Request {

0 commit comments

Comments
 (0)