Skip to content

Commit

Permalink
fix: 21219 Honour ARGOCD_APPLICATIONSET_CONTROLLER_NAMESPACES for all…
Browse files Browse the repository at this point in the history
… ApplicationSet events

Namespace filtering is applied to Update, Delete and Generic events.

Fixes argoproj#21219

Signed-off-by: eadred <[email protected]>
  • Loading branch information
eadred committed Dec 18, 2024
1 parent e6b110d commit b171dcf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions applicationset/controllers/applicationset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -525,11 +525,9 @@ func (r *ApplicationSetReconciler) getMinRequeueAfter(applicationSetInfo *argov1
}

func ignoreNotAllowedNamespaces(namespaces []string) predicate.Predicate {
return predicate.Funcs{
CreateFunc: func(e event.CreateEvent) bool {
return utils.IsNamespaceAllowed(namespaces, e.Object.GetNamespace())
},
}
return predicate.NewPredicateFuncs(func(object client.Object) bool {
return utils.IsNamespaceAllowed(namespaces, object.GetNamespace())
})
}

func appControllerIndexer(rawObj client.Object) []string {
Expand Down

0 comments on commit b171dcf

Please sign in to comment.