Skip to content

Commit

Permalink
Add GenerationChangedPredicate event filter to project controller (#1067
Browse files Browse the repository at this point in the history
)

* add generation event filter to project controller

Signed-off-by: Christian Löwel <[email protected]>
  • Loading branch information
ChristianLoewel authored Sep 21, 2023
1 parent 75d9fb7 commit 9d23a0a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions controllers/goharbor/project/ctrl_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit 9d23a0a

Please sign in to comment.