Skip to content

Commit

Permalink
fix(mgr) add Logger to Reporter
Browse files Browse the repository at this point in the history
Add a Logger to the Reporter. Without one, failure to initialize the
Reporter results in a segfault.
  • Loading branch information
Travis Raines authored and rainest committed Oct 22, 2021
1 parent 282e66a commit ad9bac2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
[#1943](https://github.com/Kong/kubernetes-ingress-controller/issues/1943)
- The admission controller now also validates KongClusterPlugin resources.
[#1764](https://github.com/Kong/kubernetes-ingress-controller/issues/1764)
- Fixed a segfault when the version reporter failed to initialize.
[#1961](https://github.com/Kong/kubernetes-ingress-controller/issues/1961)

## [2.0.3] - 2021/10/19

Expand Down
6 changes: 5 additions & 1 deletion internal/mgrutils/reports.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"

"github.com/google/uuid"
"github.com/sirupsen/logrus"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"

Expand Down Expand Up @@ -69,7 +70,10 @@ func RunReport(ctx context.Context, kubeCfg *rest.Config, kongCfg sendconfig.Kon
}

// run the reporter in the background
reporter := util.Reporter{Info: info}
reporter := util.Reporter{
Info: info,
Logger: logrus.New(),
}
go reporter.Run(ctx.Done())

return nil
Expand Down

0 comments on commit ad9bac2

Please sign in to comment.