Skip to content

Commit

Permalink
predicate
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeykazakov committed Jul 19, 2024
1 parent 29007cd commit b76d00e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/nstemplateset/nstemplateset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (r *Reconciler) SetupWithManager(mgr manager.Manager, allNamespaceCluster r

mapToOwnerByLabel := handler.EnqueueRequestsFromMapFunc(commoncontroller.MapToOwnerByLabel("", toolchainv1alpha1.SpaceLabelKey))
build := ctrl.NewControllerManagedBy(mgr).
For(&toolchainv1alpha1.NSTemplateSet{}, builder.WithPredicates(predicate.GenerationChangedPredicate{})).
For(&toolchainv1alpha1.NSTemplateSet{}, builder.WithPredicates(predicate.GenerationChangedPredicate{}, predicate.AnnotationChangedPredicate{})).
Watches(&source.Kind{Type: &corev1.Namespace{}}, mapToOwnerByLabel).
Watches(source.NewKindWithCache(&rbac.Role{}, allNamespaceCluster.GetCache()), mapToOwnerByLabel, builder.WithPredicates(commonpredicates.LabelsAndGenerationPredicate{})).
Watches(source.NewKindWithCache(&rbac.RoleBinding{}, allNamespaceCluster.GetCache()), mapToOwnerByLabel, builder.WithPredicates(commonpredicates.LabelsAndGenerationPredicate{}))
Expand Down

0 comments on commit b76d00e

Please sign in to comment.