Skip to content

Shared map modification #370

Open
@alkur-gh

Description

@alkur-gh

Hi. I have a problem with argocd-notifications-controller sending wrong labels from different notification to alertmanager.

Could it be because of this line?

notification.Alertmanager.Labels = n.Labels

From my understanding n is a shared object (original template) in

type api struct {
notificationServices map[string]services.NotificationService
templatesService templates.Service

templatesService, err := templates.NewService(cfg.Templates)

for name, cfg := range templates {
templater, err := cfg.GetTemplater(name, f)

And because of this, shared n.Labels gets modified in

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions