Skip to content

Commit b30661d

Browse files
authored
fix: authorization model reconciliation (#118)
1 parent 4d3cd05 commit b30661d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

internal/controller/store_controller.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,20 @@ func (r *StoreReconciler) SetupWithManager(mgr mcmanager.Manager, cfg *platforme
8888
return builder.
8989
Watches(
9090
&corev1alpha1.AuthorizationModel{},
91-
handler.EnqueueRequestsFromMapFunc(func(ctx context.Context, obj client.Object) []reconcile.Request {
91+
handler.TypedEnqueueRequestsFromMapFunc(func(ctx context.Context, obj client.Object) []mcreconcile.Request {
9292
model, ok := obj.(*corev1alpha1.AuthorizationModel)
9393
if !ok {
9494
return nil
9595
}
9696

97-
return []reconcile.Request{
97+
return []mcreconcile.Request{
9898
{
99-
NamespacedName: types.NamespacedName{
100-
Name: model.Spec.StoreRef.Name,
99+
Request: reconcile.Request{
100+
NamespacedName: types.NamespacedName{
101+
Name: model.Spec.StoreRef.Name,
102+
},
101103
},
104+
ClusterName: model.Spec.StoreRef.Path,
102105
},
103106
}
104107
}),

0 commit comments

Comments
 (0)