Skip to content

Commit

Permalink
fix missing token on event report
Browse files Browse the repository at this point in the history
  • Loading branch information
roeyazroel committed May 26, 2024
1 parent e0bc1a2 commit 0ad7210
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions watchdog/src/reporters/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,13 @@ type Event struct {
Kind string `json:"kind"`
}

func NewKubeReporter() *KubeReporter {
lumigoConfig := config.LoadConfig()
func NewKubeReporter(config *config.Config) *KubeReporter {
return &KubeReporter{
eventBatch: []Event{},
batchMaxSize: lumigoConfig.MAX_BATCH_SIZE,
timer: time.NewTicker(time.Duration(lumigoConfig.KUBE_INTERVAL) * time.Second),
endpoint: lumigoConfig.LUMIGO_ENDPOINT + "/api/v1/",
config: lumigoConfig,
batchMaxSize: config.MAX_BATCH_SIZE,
timer: time.NewTicker(time.Duration(config.KUBE_INTERVAL) * time.Second),
endpoint: config.LUMIGO_ENDPOINT + "/api/v1/",
config: config,
}
}

Expand Down
2 changes: 1 addition & 1 deletion watchdog/src/watchers/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func NewKubeWatcher(config *config.Config) (*KubeWatcher, error) {
return nil, err
}

reporter := reporters.NewKubeReporter()
reporter := reporters.NewKubeReporter(config)

return &KubeWatcher{
clientset: clientset,
Expand Down

0 comments on commit 0ad7210

Please sign in to comment.