diff --git a/event_reporter/controller/controller.go b/event_reporter/controller/controller.go index 2415e4111a46e..e9d1f2fae09a8 100644 --- a/event_reporter/controller/controller.go +++ b/event_reporter/controller/controller.go @@ -16,8 +16,6 @@ import ( servercache "github.com/argoproj/argo-cd/v2/server/cache" argoutil "github.com/argoproj/argo-cd/v2/util/argo" "github.com/argoproj/argo-cd/v2/util/env" - "github.com/argoproj/argo-cd/v2/util/rbac" - "github.com/argoproj/argo-cd/v2/util/security" "github.com/argoproj/argo-cd/v2/util/settings" log "github.com/sirupsen/logrus" "k8s.io/apimachinery/pkg/watch" @@ -37,11 +35,9 @@ type eventReporterController struct { settingsMgr *settings.SettingsManager appBroadcaster reporter.Broadcaster applicationEventReporter reporter.ApplicationEventReporter - enf *rbac.Enforcer cache *servercache.Cache appLister applisters.ApplicationLister ns string - enabledNamespaces []string applicationServiceClient applicationpkg.ApplicationServiceClient metricsServer *metrics.MetricsServer } @@ -60,18 +56,6 @@ func NewEventReporterController(appInformer cache.SharedIndexInformer, cache *se } } -func (c *eventReporterController) appNamespaceOrDefault(appNs string) string { - if appNs == "" { - return c.ns - } else { - return appNs - } -} - -func (c *eventReporterController) isNamespaceEnabled(namespace string) bool { - return security.IsNamespaceEnabled(namespace, c.ns, c.enabledNamespaces) -} - func (c *eventReporterController) Run(ctx context.Context) { var ( logCtx log.FieldLogger = log.StandardLogger()