From 9d23a0a40ae1eca56c757b925d91d8883875ff34 Mon Sep 17 00:00:00 2001 From: ChristianLoewel Date: Thu, 21 Sep 2023 04:11:48 +0200 Subject: [PATCH] Add GenerationChangedPredicate event filter to project controller (#1067) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add generation event filter to project controller Signed-off-by: Christian Löwel --- controllers/goharbor/project/ctrl_setup.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controllers/goharbor/project/ctrl_setup.go b/controllers/goharbor/project/ctrl_setup.go index cda0293b1..fc060486f 100644 --- a/controllers/goharbor/project/ctrl_setup.go +++ b/controllers/goharbor/project/ctrl_setup.go @@ -15,6 +15,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/controller" + "sigs.k8s.io/controller-runtime/pkg/predicate" ) const ( @@ -64,6 +65,7 @@ func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) err WithOptions(controller.Options{ MaxConcurrentReconciles: concurrentReconcile, }). + WithEventFilter(predicate.GenerationChangedPredicate{}). Complete(r) }