Skip to content

Commit

Permalink
Merge pull request #246 from Gentleelephant/release-2.5-fix-304
Browse files Browse the repository at this point in the history
fix bug
  • Loading branch information
benjaminhuo committed Mar 4, 2024
2 parents 4e93081 + 3d1d291 commit 1e666bd
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/duke-git/lancet/v2 v2.2.9 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/duke-git/lancet/v2 v2.2.9 h1:ik02ZrFg/OU0lduLfmNqo73mAhpY2a3Fm1RUFcoEtqk=
github.com/duke-git/lancet/v2 v2.2.9/go.mod h1:zGa2R4xswg6EG9I6WnyubDbFO/+A/RROxIbXcwryTsc=
github.com/emicklei/go-restful v2.16.0+incompatible h1:rgqiKNjTnFQA6kkhFe16D8epTksy9HQ1MyrbDXSdYhM=
github.com/emicklei/go-restful v2.16.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE=
Expand Down
2 changes: 1 addition & 1 deletion helm/templates/notificationmanagers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
sidecars:
tenant:
{{- if .Values.kubesphere.image }}
image: {{ .Values.kubesphere.image }}
image: {{ include "global.imageRegistry" . }}{{ .Values.kubesphere.image }}
{{- else }}
image: {{ include "global.imageRegistry" . }}{{ .Values.notificationmanager.sidecar.image.repo }}:{{ .Values.kubesphere.version }}
{{- end }}
Expand Down
4 changes: 4 additions & 0 deletions helm/templates/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,7 @@ spec:
{{- toYaml .Values.operator.affinity | nindent 8 }}
tolerations:
{{- toYaml .Values.operator.tolerations | nindent 8 }}
{{- with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
1 change: 1 addition & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ kubesphere:
global:
imageRegistry: ""
nodeSelector: {}
imagePullSecrets: []
imageRegistryOverride: ""
# value of notification-manager-operator
operator:
Expand Down
4 changes: 3 additions & 1 deletion pkg/notify/notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import (
"context"
"sync"

"github.com/duke-git/lancet/v2/convertor"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/kubesphere/notification-manager/pkg/async"
Expand Down Expand Up @@ -97,7 +99,7 @@ func (s *notifyStage) Exec(ctx context.Context, l log.Logger, data interface{})
group := async.NewGroup(ctx)
for k, v := range input {
receiver := k
ds := v
ds := convertor.DeepClone(v)
s.addExtensionLabels(receiver, ds)
nf, err := factories[receiver.GetType()](l, receiver, s.notifierCtl)
if err != nil {
Expand Down

0 comments on commit 1e666bd

Please sign in to comment.