Skip to content

Commit

Permalink
fix(Apps in Any Namespace): Notification Controller Command
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur <arthur@arthurvardevanyan.com>
  • Loading branch information
ArthurVardevanyan committed Sep 17, 2024
1 parent 603adda commit 1dedfbc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions controllers/argocd/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"reflect"
"strings"
"time"

monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1"
Expand Down Expand Up @@ -628,6 +629,16 @@ func getNotificationsCommand(cr *argoproj.ArgoCD) []string {
log.Info("Repo Server is disabled. This would affect the functioning of Notification Controller.")
}

// This flag allows the notification controller to watch
if cr.Spec.SourceNamespaces != nil && len(cr.Spec.SourceNamespaces) > 0 {
cmd = append(cmd, "--self-service-notification-enabled")
}

// This flag allows the notification controller to watch all namespaces
if cr.Spec.SourceNamespaces != nil && len(cr.Spec.SourceNamespaces) > 0 {
cmd = append(cmd, "--application-namespaces", fmt.Sprint(strings.Join(cr.Spec.SourceNamespaces, ",")))
}

return cmd
}

Expand Down

0 comments on commit 1dedfbc

Please sign in to comment.