Skip to content

Commit

Permalink
code-refactoring: periodic rebase against master (argoproj-labs#1159)
Browse files Browse the repository at this point in the history
* rebase against master

---------

Signed-off-by: Jaideep Rao <[email protected]>
  • Loading branch information
jaideepr97 authored Jan 25, 2024
1 parent e993de1 commit b06f1f9
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 1 deletion.
8 changes: 8 additions & 0 deletions controllers/argocd/notifications/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion controllers/argocd/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
42 changes: 42 additions & 0 deletions controllers/argocd/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)},
Expand Down

0 comments on commit b06f1f9

Please sign in to comment.