Skip to content

Commit

Permalink
fix(Alert Throttling): making throttling dynamic
Browse files Browse the repository at this point in the history
Signed-off-by: Prateek <[email protected]>
  • Loading branch information
Prateeknandle committed Aug 28, 2024
1 parent cdfa1b7 commit 08d0663
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions KubeArmor/monitor/systemMonitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ func (mon *SystemMonitor) UpdateThrottlingConfig() {
if err := mon.BpfConfigMap.Update(uint32(3), uint32(1), cle.UpdateAny); err != nil {
mon.Logger.Errf("Error Updating System Monitor Config Map to enable alert throttling : %s", err.Error())
}
} else {
if err := mon.BpfConfigMap.Update(uint32(3), uint32(0), cle.UpdateAny); err != nil {
mon.Logger.Errf("Error Updating System Monitor Config Map to enable alert throttling : %s", err.Error())
}
}
if err := mon.BpfConfigMap.Update(uint32(4), uint32(cfg.GlobalCfg.MaxAlertPerSec), cle.UpdateAny); err != nil {
mon.Logger.Errf("Error Updating System Monitor Config Map to set max alerts per sec : %s", err.Error())
Expand Down

0 comments on commit 08d0663

Please sign in to comment.