Skip to content

Commit

Permalink
feat: Argocd notification self service (argoproj#16488)
Browse files Browse the repository at this point in the history
* self service notification

Signed-off-by: May Zhang <[email protected]>

* revert back the changes for redis-ha

Signed-off-by: May Zhang <[email protected]>

* revert back the changes for redis-ha

Signed-off-by: May Zhang <[email protected]>

* update notification engine

Signed-off-by: May Zhang <[email protected]>

* re-trigger build

Signed-off-by: May Zhang <[email protected]>

* self service notification

Signed-off-by: May Zhang <[email protected]>

* revert back the changes for redis-ha

Signed-off-by: May Zhang <[email protected]>

* revert back the changes for redis-ha

Signed-off-by: May Zhang <[email protected]>

* update notification engine

Signed-off-by: May Zhang <[email protected]>

* re-trigger build

Signed-off-by: May Zhang <[email protected]>

* fix conflict

Signed-off-by: May Zhang <[email protected]>

* fix conflict

Signed-off-by: May Zhang <[email protected]>

* fix conflict

Signed-off-by: May Zhang <[email protected]>

* fix conflict

Signed-off-by: May Zhang <[email protected]>

* update notification enginer version

Signed-off-by: May Zhang <[email protected]>

* update notification enginer version

Signed-off-by: May Zhang <[email protected]>

* fixing go tidy

Signed-off-by: May Zhang <[email protected]>

* fixing go tidy

Signed-off-by: May Zhang <[email protected]>

* fixing go tidy

Signed-off-by: May Zhang <[email protected]>

* fixing go tidy

Signed-off-by: May Zhang <[email protected]>

* fixing go tidy

Signed-off-by: May Zhang <[email protected]>

* add back checkAppNotInAdditionalNamespaces

Signed-off-by: May Zhang <[email protected]>

* add cm and secret to clusterRole

Signed-off-by: May Zhang <[email protected]>

* if applicationNamespaces is not used, then use namespaced appClient

Signed-off-by: May Zhang <[email protected]>

* fix merge conflict

Signed-off-by: May Zhang <[email protected]>

* fix doc and test based on review

Signed-off-by: May Zhang <[email protected]>

* self service notification

Signed-off-by: May Zhang <[email protected]>

* revert back the changes for redis-ha

Signed-off-by: May Zhang <[email protected]>

* revert back the changes for redis-ha

Signed-off-by: May Zhang <[email protected]>

* update notification engine

Signed-off-by: May Zhang <[email protected]>

* re-trigger build

Signed-off-by: May Zhang <[email protected]>

* fix conflict

Signed-off-by: May Zhang <[email protected]>

* self service notification

Signed-off-by: May Zhang <[email protected]>

* revert back the changes for redis-ha

Signed-off-by: May Zhang <[email protected]>

* revert back the changes for redis-ha

Signed-off-by: May Zhang <[email protected]>

* update notification engine

Signed-off-by: May Zhang <[email protected]>

* re-trigger build

Signed-off-by: May Zhang <[email protected]>

* fix conflict

Signed-off-by: May Zhang <[email protected]>

* fix conflict

Signed-off-by: May Zhang <[email protected]>

* fix conflict

Signed-off-by: May Zhang <[email protected]>

* update notification enginer version

Signed-off-by: May Zhang <[email protected]>

* update notification enginer version

Signed-off-by: May Zhang <[email protected]>

* fixing go tidy

Signed-off-by: May Zhang <[email protected]>

* fixing go tidy

Signed-off-by: May Zhang <[email protected]>

* fixing go tidy

Signed-off-by: May Zhang <[email protected]>

* fixing go tidy

Signed-off-by: May Zhang <[email protected]>

* fixing go tidy

Signed-off-by: May Zhang <[email protected]>

* add back checkAppNotInAdditionalNamespaces

Signed-off-by: May Zhang <[email protected]>

* add cm and secret to clusterRole

Signed-off-by: May Zhang <[email protected]>

* if applicationNamespaces is not used, then use namespaced appClient

Signed-off-by: May Zhang <[email protected]>

* fix doc and test based on review

Signed-off-by: May Zhang <[email protected]>

* disable defining and using secrets within notification templates for self-service

Signed-off-by: May Zhang <[email protected]>

* tweaks

Signed-off-by: Michael Crenshaw <[email protected]>

* fix docs formatting

Signed-off-by: Michael Crenshaw <[email protected]>

* more docs and Procfile update for local run convenience

Signed-off-by: Michael Crenshaw <[email protected]>

---------

Signed-off-by: May Zhang <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
  • Loading branch information
2 people authored and Hariharasuthan99 committed Jun 16, 2024
1 parent 4c21aa7 commit 48d0359
Show file tree
Hide file tree
Showing 17 changed files with 224 additions and 59 deletions.
3 changes: 2 additions & 1 deletion Procfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ git-server: test/fixture/testrepos/start-git.sh
helm-registry: test/fixture/testrepos/start-helm-registry.sh
dev-mounter: [[ "$ARGOCD_E2E_TEST" != "true" ]] && go run hack/dev-mounter/main.go --configmap argocd-ssh-known-hosts-cm=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} --configmap argocd-tls-certs-cm=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} --configmap argocd-gpg-keys-cm=${ARGOCD_GPG_DATA_PATH:-/tmp/argocd-local/gpg/source}
applicationset-controller: [ "$BIN_MODE" = 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "FORCE_LOG_COLORS=4 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} ARGOCD_BINARY_NAME=argocd-applicationset-controller $COMMAND --loglevel debug --metrics-addr localhost:12345 --probe-addr localhost:12346 --argocd-repo-server localhost:${ARGOCD_E2E_REPOSERVER_PORT:-8081}"
notification: [ "$BIN_MODE" = 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "FORCE_LOG_COLORS=4 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_BINARY_NAME=argocd-notifications $COMMAND --loglevel debug"
notification: [ "$BIN_MODE" = 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "FORCE_LOG_COLORS=4 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_BINARY_NAME=argocd-notifications $COMMAND --loglevel debug --application-namespaces=${ARGOCD_APPLICATION_NAMESPACES:-''} --self-service-notification-enabled=${ARGOCD_NOTIFICATION_CONTROLLER_SELF_SERVICE_NOTIFICATION_ENABLED:-'false'}"

30 changes: 16 additions & 14 deletions cmd/argocd-notification/commands/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,20 @@ func addK8SFlagsToCmd(cmd *cobra.Command) clientcmd.ClientConfig {

func NewCommand() *cobra.Command {
var (
clientConfig clientcmd.ClientConfig
processorsCount int
namespace string
appLabelSelector string
logLevel string
logFormat string
metricsPort int
argocdRepoServer string
argocdRepoServerPlaintext bool
argocdRepoServerStrictTLS bool
configMapName string
secretName string
applicationNamespaces []string
clientConfig clientcmd.ClientConfig
processorsCount int
namespace string
appLabelSelector string
logLevel string
logFormat string
metricsPort int
argocdRepoServer string
argocdRepoServerPlaintext bool
argocdRepoServerStrictTLS bool
configMapName string
secretName string
applicationNamespaces []string
selfServiceNotificationEnabled bool
)
var command = cobra.Command{
Use: "controller",
Expand Down Expand Up @@ -139,7 +140,7 @@ func NewCommand() *cobra.Command {
log.Infof("serving metrics on port %d", metricsPort)
log.Infof("loading configuration %d", metricsPort)

ctrl := notificationscontroller.NewController(k8sClient, dynamicClient, argocdService, namespace, applicationNamespaces, appLabelSelector, registry, secretName, configMapName)
ctrl := notificationscontroller.NewController(k8sClient, dynamicClient, argocdService, namespace, applicationNamespaces, appLabelSelector, registry, secretName, configMapName, selfServiceNotificationEnabled)
err = ctrl.Init(ctx)
if err != nil {
return fmt.Errorf("failed to initialize controller: %w", err)
Expand All @@ -163,5 +164,6 @@ func NewCommand() *cobra.Command {
command.Flags().StringVar(&configMapName, "config-map-name", "argocd-notifications-cm", "Set notifications ConfigMap name")
command.Flags().StringVar(&secretName, "secret-name", "argocd-notifications-secret", "Set notifications Secret name")
command.Flags().StringSliceVar(&applicationNamespaces, "application-namespaces", env.StringsFromEnv("ARGOCD_APPLICATION_NAMESPACES", []string{}, ","), "List of additional namespaces that this controller should send notifications for")
command.Flags().BoolVar(&selfServiceNotificationEnabled, "self-service-notification-enabled", env.ParseBoolFromEnv("ARGOCD_NOTIFICATION_CONTROLLER_SELF_SERVICE_NOTIFICATION_ENABLED", false), "Allows the Argo CD notification controller to pull notification config from the namespace that the resource is in. This is useful for self-service notification.")
return &command
}
2 changes: 1 addition & 1 deletion cmd/argocd/commands/admin/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func NewNotificationsCommand() *cobra.Command {
"notifications",
"argocd admin notifications",
applications,
settings.GetFactorySettings(argocdService, "argocd-notifications-secret", "argocd-notifications-cm"), func(clientConfig clientcmd.ClientConfig) {
settings.GetFactorySettings(argocdService, "argocd-notifications-secret", "argocd-notifications-cm", false), func(clientConfig clientcmd.ClientConfig) {
k8sCfg, err := clientConfig.ClientConfig()
if err != nil {
log.Fatalf("Failed to parse k8s config: %v", err)
Expand Down
5 changes: 4 additions & 1 deletion docs/operator-manual/app-any-namespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ Some manual steps will need to be performed by the Argo CD administrator in orde

!!! note
This feature is considered beta as of now. Some of the implementation details may change over the course of time until it is promoted to a stable status. We will be happy if early adopters use this feature and provide us with bug reports and feedback.



One additional advantage of adopting applications in any namespace is to allow end-users to configure notifications for their Argo CD application in the namespace where Argo CD application is running in. See notifications [namespace based configuration](notifications/index.md#namespace-based-configuration) page for more information.

## Prerequisites

### Cluster-scoped Argo CD installation
Expand Down
2 changes: 2 additions & 0 deletions docs/operator-manual/argocd-cmd-params-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,5 @@ data:
notificationscontroller.log.level: "info"
# Set the logging format. One of: text|json (default "text")
notificationscontroller.log.format: "text"
# Enable self-service notifications config. Used in conjunction with apps-in-any-namespace. (default "false")
notificationscontroller.selfservice.enabled: "false"
68 changes: 68 additions & 0 deletions docs/operator-manual/notifications/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,71 @@ So you can just use them instead of reinventing new ones.
```
Try syncing an application to get notified when the sync is completed.
## Namespace based configuration
A common installation method for Argo CD Notifications is to install it in a dedicated namespace to manage a whole cluster. In this case, the administrator is the only
person who can configure notifications in that namespace generally. However, in some cases, it is required to allow end-users to configure notifications
for their Argo CD applications. For example, the end-user can configure notifications for their Argo CD application in the namespace where they have access to and their Argo CD application is running in.
This feature is based on applications in any namespace. See [applications in any namespace](../app-any-namespace.md) page for more information.
In order to enable this feature, the Argo CD administrator must reconfigure the argocd-notification-controller workloads to add `--application-namespaces` and `--self-service-notification-enabled` parameters to the container's startup command.
`--application-namespaces` controls the list of namespaces that Argo CD applications are in. `--self-service-notification-enabled` turns on this feature.
The startup parameters for both can also be conveniently set up and kept in sync by specifying
the `application.namespaces` and `notificationscontroller.selfservice.enabled` in the argocd-cmd-params-cm ConfigMap instead of changing the manifests for the respective workloads. For example:
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cmd-params-cm
data:
application.namespaces: app-team-one, app-team-two
notificationscontroller.selfservice.enabled: true
```
To use this feature, you can deploy configmap named `argocd-notifications-cm` and possibly a secret `argocd-notifications-secret` in the namespace where the Argo CD application lives.
When it is configured this way the controller will send notifications using both the controller level configuration (the configmap located in the same namespaces as the controller) as well as
the configuration located in the same namespace where the Argo CD application is at.
Example: Application team wants to receive notifications using PagerDutyV2, when the controller level configuration is only supporting Slack.
The following two resources are deployed in the namespace where the Argo CD application lives.
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-notifications-cm
data:
service.pagerdutyv2: |
serviceKeys:
my-service: $pagerduty-key-my-service
...
```
```yaml
apiVersion: v1
kind: Secret
metadata:
name: argo-cd-notification-secret
type: Opaque
data:
pagerduty-key-my-service: <pd-integration-key>
```
When an Argo CD application has the following subscriptions, user receives application sync failure message from pager duty.
```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
annotations:
notifications.argoproj.io/subscribe.on-sync-failed.pagerdutyv2: "<serviceID for Pagerduty>"
```
!!! note
When the same notification service and trigger are defined in controller level configuration and application level configuration,
both notifications will be sent according to its own configuration.
[Defining and using secrets within notification templates](templates.md/#defining-and-using-secrets-within-notification-templates) function is not available when flag `--self-service-notification-enable` is on.
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,13 @@ rules:
- list
- watch
- update
- patch
- patch
- apiGroups:
- ""
resources:
- secrets
- configmaps
verbs:
- get
- list
- watch
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ spec:
key: application.namespaces
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_NOTIFICATION_CONTROLLER_SELF_SERVICE_NOTIFICATION_ENABLED
valueFrom:
configMapKeyRef:
key: notificationscontroller.selfservice.enabled
name: argocd-cmd-params-cm
optional: true
workingDir: /app
livenessProbe:
tcpSocket:
Expand Down
6 changes: 6 additions & 0 deletions manifests/ha/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22472,6 +22472,12 @@ spec:
key: application.namespaces
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_NOTIFICATION_CONTROLLER_SELF_SERVICE_NOTIFICATION_ENABLED
valueFrom:
configMapKeyRef:
key: notificationscontroller.selfservice.enabled
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:latest
imagePullPolicy: Always
livenessProbe:
Expand Down
6 changes: 6 additions & 0 deletions manifests/ha/namespace-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1859,6 +1859,12 @@ spec:
key: application.namespaces
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_NOTIFICATION_CONTROLLER_SELF_SERVICE_NOTIFICATION_ENABLED
valueFrom:
configMapKeyRef:
key: notificationscontroller.selfservice.enabled
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:latest
imagePullPolicy: Always
livenessProbe:
Expand Down
6 changes: 6 additions & 0 deletions manifests/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21567,6 +21567,12 @@ spec:
key: application.namespaces
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_NOTIFICATION_CONTROLLER_SELF_SERVICE_NOTIFICATION_ENABLED
valueFrom:
configMapKeyRef:
key: notificationscontroller.selfservice.enabled
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:latest
imagePullPolicy: Always
livenessProbe:
Expand Down
6 changes: 6 additions & 0 deletions manifests/namespace-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,12 @@ spec:
key: application.namespaces
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_NOTIFICATION_CONTROLLER_SELF_SERVICE_NOTIFICATION_ENABLED
valueFrom:
configMapKeyRef:
key: notificationscontroller.selfservice.enabled
name: argocd-cmd-params-cm
optional: true
image: quay.io/argoproj/argocd:latest
imagePullPolicy: Always
livenessProbe:
Expand Down
54 changes: 37 additions & 17 deletions notification_controller/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,39 +63,58 @@ func NewController(
registry *controller.MetricsRegistry,
secretName string,
configMapName string,
selfServiceNotificationEnabled bool,
) *notificationController {
var appClient dynamic.ResourceInterface

namespaceableAppClient := client.Resource(applications)
appClient = namespaceableAppClient

if len(applicationNamespaces) == 0 {
appClient = namespaceableAppClient.Namespace(namespace)
}

appInformer := newInformer(appClient, namespace, applicationNamespaces, appLabelSelector)
appProjInformer := newInformer(newAppProjClient(client, namespace), namespace, []string{namespace}, "")
secretInformer := k8s.NewSecretInformer(k8sClient, namespace, secretName)
configMapInformer := k8s.NewConfigMapInformer(k8sClient, namespace, configMapName)
apiFactory := api.NewFactory(settings.GetFactorySettings(argocdService, secretName, configMapName), namespace, secretInformer, configMapInformer)
var notificationConfigNamespace string
if selfServiceNotificationEnabled {
notificationConfigNamespace = v1.NamespaceAll
} else {
notificationConfigNamespace = namespace
}
secretInformer := k8s.NewSecretInformer(k8sClient, notificationConfigNamespace, secretName)
configMapInformer := k8s.NewConfigMapInformer(k8sClient, notificationConfigNamespace, configMapName)
apiFactory := api.NewFactory(settings.GetFactorySettings(argocdService, secretName, configMapName, selfServiceNotificationEnabled), namespace, secretInformer, configMapInformer)

res := &notificationController{
secretInformer: secretInformer,
configMapInformer: configMapInformer,
appInformer: appInformer,
appProjInformer: appProjInformer,
apiFactory: apiFactory}
res.ctrl = controller.NewController(namespaceableAppClient, appInformer, apiFactory,
controller.WithSkipProcessing(func(obj v1.Object) (bool, string) {
app, ok := (obj).(*unstructured.Unstructured)
if !ok {
return false, ""
}
if checkAppNotInAdditionalNamespaces(app, namespace, applicationNamespaces) {
return true, "app is not in one of the application-namespaces, nor the notification controller namespace"
}
return !isAppSyncStatusRefreshed(app, log.WithField("app", obj.GetName())), "sync status out of date"
}),
controller.WithMetricsRegistry(registry),
controller.WithAlterDestinations(res.alterDestinations))
skipProcessingOpt := controller.WithSkipProcessing(func(obj v1.Object) (bool, string) {
app, ok := (obj).(*unstructured.Unstructured)
if !ok {
return false, ""
}
if checkAppNotInAdditionalNamespaces(app, namespace, applicationNamespaces) {
return true, "app is not in one of the application-namespaces, nor the notification controller namespace"
}
return !isAppSyncStatusRefreshed(app, log.WithField("app", obj.GetName())), "sync status out of date"
})
metricsRegistryOpt := controller.WithMetricsRegistry(registry)
alterDestinationsOpt := controller.WithAlterDestinations(res.alterDestinations)

if !selfServiceNotificationEnabled {
res.ctrl = controller.NewController(namespaceableAppClient, appInformer, apiFactory,
skipProcessingOpt,
metricsRegistryOpt,
alterDestinationsOpt)
} else {
res.ctrl = controller.NewControllerWithNamespaceSupport(namespaceableAppClient, appInformer, apiFactory,
skipProcessingOpt,
metricsRegistryOpt,
alterDestinationsOpt)
}
return res
}

Expand All @@ -118,6 +137,7 @@ func (c *notificationController) alterDestinations(obj v1.Object, destinations s
}

func newInformer(resClient dynamic.ResourceInterface, controllerNamespace string, applicationNamespaces []string, selector string) cache.SharedIndexInformer {

informer := cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
Expand Down
45 changes: 25 additions & 20 deletions notification_controller/controller/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,26 +110,30 @@ func TestInit(t *testing.T) {
k8sClient := k8sfake.NewSimpleClientset()
appLabelSelector := "app=test"

nc := NewController(
k8sClient,
dynamicClient,
nil,
"default",
[]string{},
appLabelSelector,
nil,
"my-secret",
"my-configmap",
)

assert.NotNil(t, nc)

ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()

err = nc.Init(ctx)

assert.NoError(t, err)
selfServiceNotificationEnabledFlags := []bool{false, true}
for _, selfServiceNotificationEnabled := range selfServiceNotificationEnabledFlags {
nc := NewController(
k8sClient,
dynamicClient,
nil,
"default",
[]string{},
appLabelSelector,
nil,
"my-secret",
"my-configmap",
selfServiceNotificationEnabled,
)

assert.NotNil(t, nc)

ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()

err = nc.Init(ctx)

assert.NoError(t, err)
}
}

func TestInitTimeout(t *testing.T) {
Expand All @@ -152,6 +156,7 @@ func TestInitTimeout(t *testing.T) {
nil,
"my-secret",
"my-configmap",
false,
)

assert.NotNil(t, nc)
Expand Down
2 changes: 1 addition & 1 deletion server/notification/notification_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func TestNotificationServer(t *testing.T) {
argocdService, err := service.NewArgoCDService(kubeclientset, testNamespace, mockRepoClient)
require.NoError(t, err)
defer argocdService.Close()
apiFactory := api.NewFactory(settings.GetFactorySettings(argocdService, "argocd-notifications-secret", "argocd-notifications-cm"), testNamespace, secretInformer, configMapInformer)
apiFactory := api.NewFactory(settings.GetFactorySettings(argocdService, "argocd-notifications-secret", "argocd-notifications-cm", false), testNamespace, secretInformer, configMapInformer)

t.Run("TestListServices", func(t *testing.T) {
server := NewServer(apiFactory)
Expand Down
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ func NewServer(ctx context.Context, opts ArgoCDServerOpts) *ArgoCDServer {
secretInformer := k8s.NewSecretInformer(opts.KubeClientset, opts.Namespace, "argocd-notifications-secret")
configMapInformer := k8s.NewConfigMapInformer(opts.KubeClientset, opts.Namespace, "argocd-notifications-cm")

apiFactory := api.NewFactory(settings_notif.GetFactorySettings(argocdService, "argocd-notifications-secret", "argocd-notifications-cm"), opts.Namespace, secretInformer, configMapInformer)
apiFactory := api.NewFactory(settings_notif.GetFactorySettings(argocdService, "argocd-notifications-secret", "argocd-notifications-cm", false), opts.Namespace, secretInformer, configMapInformer)

dbInstance := db.NewDB(opts.Namespace, settingsMgr, opts.KubeClientset)
logger := log.NewEntry(log.StandardLogger())
Expand Down
Loading

0 comments on commit 48d0359

Please sign in to comment.