Skip to content

Commit 19f074a

Browse files
authored
Merge pull request #2504 from k8s-infra-cherrypick-robot/cherry-pick-2503-to-release-0.11
[release-0.11] 🐛 fix openstackserver controller concurrency
2 parents bb1e59c + 7a17a78 commit 19f074a

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
@@ -169,7 +169,7 @@ func patchServer(ctx context.Context, patchHelper *patch.Helper, openStackServer
169169
return patchHelper.Patch(ctx, openStackServer, options...)
170170
}
171171

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

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

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

0 commit comments

Comments
 (0)