Skip to content

Commit 846681f

Browse files
committed
fix: use or predicate
Signed-off-by: JM Huibonhoa <[email protected]>
1 parent f78f5d9 commit 846681f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/controller/mcpserver_controller.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,10 @@ func (r *MCPServerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
103103
func (r *MCPServerReconciler) SetupWithManager(mgr ctrl.Manager) error {
104104
return ctrl.NewControllerManagedBy(mgr).
105105
For(&kagentdevv1alpha1.MCPServer{}, builder.WithPredicates(
106-
predicate.GenerationChangedPredicate{},
107-
predicate.LabelChangedPredicate{},
106+
predicate.Or(
107+
predicate.GenerationChangedPredicate{},
108+
predicate.LabelChangedPredicate{},
109+
),
108110
)).
109111
Owns(&appsv1.Deployment{}, builder.WithPredicates(predicate.ResourceVersionChangedPredicate{})).
110112
Owns(&corev1.Service{}, builder.WithPredicates(predicate.ResourceVersionChangedPredicate{})).

0 commit comments

Comments
 (0)