diff --git a/controllers/argocd/notifications/util.go b/controllers/argocd/notifications/util.go index d8583ca73..b6d7fdae2 100644 --- a/controllers/argocd/notifications/util.go +++ b/controllers/argocd/notifications/util.go @@ -555,6 +555,14 @@ func (nr *NotificationsReconciler) GetNotificationsCommand() []string { cmd = append(cmd, "--loglevel") cmd = append(cmd, argoutil.GetLogLevel(nr.Instance.Spec.Notifications.LogLevel)) + // TO DO: fix this after repo-server is implemented w/ interfaces + + // if nr.Instance.Spec.Repo.IsEnabled() { + // cmd = append(cmd, "--argocd-repo-server", getRepoServerAddress(cr)) + // } else { + // log.Info("Repo Server is disabled. This would affect the functioning of Notification Controller.") + // } + return cmd } diff --git a/controllers/argocd/util.go b/controllers/argocd/util.go index 8357d6e7b..f7a715b5f 100644 --- a/controllers/argocd/util.go +++ b/controllers/argocd/util.go @@ -235,7 +235,7 @@ func (r *ReconcileArgoCD) getArgoServerURI(cr *argoproj.ArgoCD) string { // getArgoServerOperationProcessors will return the numeric Operation Processors value for the ArgoCD Server. func getArgoServerOperationProcessors(cr *argoproj.ArgoCD) int32 { op := common.ArgoCDDefaultServerOperationProcessors - if cr.Spec.Controller.Processors.Operation > op { + if cr.Spec.Controller.Processors.Operation > 0 { op = cr.Spec.Controller.Processors.Operation } return op diff --git a/controllers/argocd/util_test.go b/controllers/argocd/util_test.go index 391ec014a..0937aacd6 100644 --- a/controllers/argocd/util_test.go +++ b/controllers/argocd/util_test.go @@ -383,6 +383,48 @@ func TestGetArgoApplicationControllerCommand(t *testing.T) { "text", }, }, + { + "configured operation processors to zero", + []argoCDOpt{operationProcessors(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 operation processors to be between zero and ten", + []argoCDOpt{operationProcessors(5)}, + []string{ + "argocd-application-controller", + "--operation-processors", + "5", + "--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 parallelism limit", []argoCDOpt{parallelismLimit(30)},