Skip to content

Commit d24099e

Browse files
committed
fix: controller now reconciles on label changes
Signed-off-by: JM Huibonhoa <jm.huibonhoa@solo.io>
1 parent 6f4b948 commit d24099e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/controller/mcpserver_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func (r *MCPServerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
102102
// SetupWithManager sets up the controller with the Manager.
103103
func (r *MCPServerReconciler) SetupWithManager(mgr ctrl.Manager) error {
104104
return ctrl.NewControllerManagedBy(mgr).
105-
For(&kagentdevv1alpha1.MCPServer{}, builder.WithPredicates(predicate.GenerationChangedPredicate{})).
105+
For(&kagentdevv1alpha1.MCPServer{}, builder.WithPredicates(predicate.GenerationChangedPredicate{}, predicate.LabelChangedPredicate{})).
106106
Owns(&appsv1.Deployment{}, builder.WithPredicates(predicate.ResourceVersionChangedPredicate{})).
107107
Owns(&corev1.Service{}, builder.WithPredicates(predicate.ResourceVersionChangedPredicate{})).
108108
Owns(&corev1.ConfigMap{}, builder.WithPredicates(predicate.ResourceVersionChangedPredicate{})).

0 commit comments

Comments
 (0)