AlinsRan commented on code in PR #2449: URL: https://github.com/apache/apisix-ingress-controller/pull/2449#discussion_r2184124676
########## internal/controller/apisixtls_controller.go: ########## @@ -65,6 +65,10 @@ func (r *ApisixTlsReconciler) SetupWithManager(mgr ctrl.Manager) error { predicate.Or( predicate.GenerationChangedPredicate{}, predicate.AnnotationChangedPredicate{}, + predicate.NewPredicateFuncs(func(obj client.Object) bool { Review Comment: It can be more universal, how about using a template? ```go predicate.NewPredicateFuncs(TypePredicate[*corev1.Secret]()) func TypePredicate[T client.Object]() func(obj client.Object) bool { return func(obj client.Object) bool { _, ok := obj.(T) return ok } } ``` -- 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