Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(notifications-controller): Set cert resolver to use injected "argocd-tls-certs-cm"(#15392) #15394

Merged
merged 2 commits into from
Oct 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions notification_controller/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (

service "github.com/argoproj/argo-cd/v2/util/notification/argocd"

argocert "github.com/argoproj/argo-cd/v2/util/cert"

"k8s.io/apimachinery/pkg/runtime/schema"

"github.com/argoproj/argo-cd/v2/util/notification/settings"
Expand All @@ -21,6 +23,7 @@ import (
"github.com/argoproj/notifications-engine/pkg/controller"
"github.com/argoproj/notifications-engine/pkg/services"
"github.com/argoproj/notifications-engine/pkg/subscriptions"
httputil "github.com/argoproj/notifications-engine/pkg/util/http"
log "github.com/sirupsen/logrus"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
Expand Down Expand Up @@ -160,6 +163,9 @@ type notificationController struct {
}

func (c *notificationController) Init(ctx context.Context) error {
// resolve certificates using injected "argocd-tls-certs-cm" ConfigMap
httputil.SetCertResolver(argocert.GetCertificateForConnect)

go c.appInformer.Run(ctx.Done())
go c.appProjInformer.Run(ctx.Done())
go c.secretInformer.Run(ctx.Done())
Expand Down
Loading