diff --git a/controllers/argocd/util.go b/controllers/argocd/util.go index fb822f6ee..897af9a5d 100644 --- a/controllers/argocd/util.go +++ b/controllers/argocd/util.go @@ -318,7 +318,7 @@ func getArgoServerOperationProcessors(cr *argoproj.ArgoCD) int32 { // getArgoServerStatusProcessors will return the numeric Status Processors value for the ArgoCD Server. func getArgoServerStatusProcessors(cr *argoproj.ArgoCD) int32 { sp := common.ArgoCDDefaultServerStatusProcessors - if cr.Spec.Controller.Processors.Status > sp { + if cr.Spec.Controller.Processors.Status > 0 { sp = cr.Spec.Controller.Processors.Status } return sp diff --git a/controllers/argocd/util_test.go b/controllers/argocd/util_test.go index daeeb11aa..4360855ec 100644 --- a/controllers/argocd/util_test.go +++ b/controllers/argocd/util_test.go @@ -368,6 +368,48 @@ func TestGetArgoApplicationControllerCommand(t *testing.T) { "text", }, }, + { + "configured status processors to zero", + []argoCDOpt{controllerProcessors(0)}, + []string{ + "argocd-application-controller", + "--operation-processors", + "10", + "--redis", + "argocd-redis.argocd.svc.cluster.local:6379", + "--repo-server", + "argocd-repo-server.argocd.svc.cluster.local:8081", + "--status-processors", + "20", + "--kubectl-parallelism-limit", + "10", + "--loglevel", + "info", + "--logformat", + "text", + }, + }, + { + "configured status processors to be between zero and default", + []argoCDOpt{controllerProcessors(10)}, + []string{ + "argocd-application-controller", + "--operation-processors", + "10", + "--redis", + "argocd-redis.argocd.svc.cluster.local:6379", + "--repo-server", + "argocd-repo-server.argocd.svc.cluster.local:8081", + "--status-processors", + "10", + "--kubectl-parallelism-limit", + "10", + "--loglevel", + "info", + "--logformat", + "text", + }, + }, { "configured operation processors", []argoCDOpt{operationProcessors(15)},