Skip to content

Commit

Permalink
Add predicates to tokenissuer watch
Browse files Browse the repository at this point in the history
  • Loading branch information
Tharsanan1 authored and tharindu1st committed Mar 6, 2024
1 parent 287c2c3 commit 923f35b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ func NewTokenIssuerReconciler(mgr manager.Manager) error {
return err
}

conf := config.ReadConfigs()
predicates := []predicate.Predicate{predicate.NewPredicateFuncs(utils.FilterByNamespaces(conf.Adapter.Operator.Namespaces))}

if err := c.Watch(source.Kind(mgr.GetCache(), &dpv1alpha1.TokenIssuer{}), &handler.EnqueueRequestForObject{},
predicate.NewPredicateFuncs(utils.FilterByNamespaces([]string{utils.GetOperatorPodNamespace()}))); err != nil {
predicates...); err != nil {
loggers.LoggerAPKOperator.ErrorC(logging.PrintError(logging.Error2656, logging.BLOCKER, "Error watching TokenIssuer resources: %v", err.Error()))
return err
}
conf := config.ReadConfigs()
predicates := []predicate.Predicate{predicate.NewPredicateFuncs(utils.FilterByNamespaces(conf.Adapter.Operator.Namespaces))}


if err := c.Watch(source.Kind(mgr.GetCache(), &corev1.ConfigMap{}), handler.EnqueueRequestsFromMapFunc(r.populateTokenReconcileRequestsForConfigMap),
predicates...); err != nil {
Expand Down

0 comments on commit 923f35b

Please sign in to comment.