Skip to content

Commit

Permalink
Ignore previous status when disabling alerts (#1061)
Browse files Browse the repository at this point in the history
Co-authored-by: José Luis Segura Lucas <[email protected]>
  • Loading branch information
openshift-cherrypick-robot and joselsegura authored Jan 16, 2025
1 parent 5328a85 commit 80aaae3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/insights/prometheus_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (p *PrometheusRulesController) Start(ctx context.Context) {
func (p *PrometheusRulesController) checkAlertsDisabled(ctx context.Context) {
disableInsightsAlerts := p.configurator.Config().Alerting.Disabled

if disableInsightsAlerts && p.promRulesExist {
if disableInsightsAlerts {
err := p.removeInsightsAlerts(ctx)
if err != nil {
klog.Errorf("Failed to remove Insights Prometheus rules definition: %v", err)
Expand Down

0 comments on commit 80aaae3

Please sign in to comment.