Skip to content

Commit

Permalink
Add Grafana annotation if configured
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcl committed Jun 19, 2024
1 parent ceeafb8 commit ec8c11b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions integration-tests/testsetups/ocr.go
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,12 @@ func (o *OCRSoakTest) startGethNetworkDownSimulation(conf tc.ChaosSimulation) {
chaos.Create(context.Background())
chaos.AddListener(k8schaos.NewChaosLogger(o.log))
chaos.AddListener(ocrTestChaosListener{t: o.t})
// Add Grafana annotation if configured
if o.Config.Logging.Grafana != nil && o.Config.Logging.Grafana.BaseUrl != nil && o.Config.Logging.Grafana.BearerToken != nil && o.Config.Logging.Grafana.DashboardUID != nil {
chaos.AddListener(k8schaos.NewSingleLineGrafanaAnnotator(
*o.Config.Logging.Grafana.BaseUrl, *o.Config.Logging.Grafana.BearerToken,
*o.Config.Logging.Grafana.DashboardUID, o.log))
}
o.chaosSimulations = append(o.chaosSimulations, chaos)
}

Expand Down

0 comments on commit ec8c11b

Please sign in to comment.