Copilot commented on code in PR #2449:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/2449#discussion_r2184118947


##########
internal/controller/gatewayproxy_controller.go:
##########
@@ -51,6 +52,15 @@ type GatewayProxyController struct {
 func (r *GatewayProxyController) SetupWithManager(mrg ctrl.Manager) error {
        return ctrl.NewControllerManagedBy(mrg).
                For(&v1alpha1.GatewayProxy{}).
+               WithEventFilter(
+                       predicate.Or(
+                               predicate.GenerationChangedPredicate{},

Review Comment:
   The gateway proxy controller omits `predicate.AnnotationChangedPredicate{}` 
in the event filter, unlike the other controllers. Add it between 
`GenerationChangedPredicate{}` and the Secret filter for consistency.
   ```suggestion
                                predicate.GenerationChangedPredicate{},
                                predicate.AnnotationChangedPredicate{},
   ```



##########
internal/controller/ingressclass_controller.go:
##########
@@ -62,6 +62,7 @@ func (r *IngressClassReconciler) SetupWithManager(mgr 
ctrl.Manager) error {
                WithEventFilter(
                        predicate.Or(
                                predicate.GenerationChangedPredicate{},
+                               predicate.AnnotationChangedPredicate{},
                                predicate.NewPredicateFuncs(func(obj 
client.Object) bool {

Review Comment:
   [nitpick] The inline Secret-type predicate is duplicated across multiple 
controllers. Extract this into a shared helper (e.g., `secretEventPredicate`) 
to reduce duplication and improve maintainability.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to