Skip to content

Commit

Permalink
Merge pull request #1625 from grafana/fix/backoff-requeue-on-failed-sync
Browse files Browse the repository at this point in the history
fix: requeue on apply errors
  • Loading branch information
theSuess authored Jul 30, 2024
2 parents 4801274 + df14c74 commit ed8e2ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controllers/grafanaalertrulegroup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ func (r *GrafanaAlertRuleGroupReconciler) Reconcile(ctx context.Context, req ctr
}
condition := buildSynchronizedCondition("Alert Rule Group", conditionAlertGroupSynchronized, group.Generation, applyErrors, len(instances))
meta.SetStatusCondition(&group.Status.Conditions, condition)

if len(applyErrors) > 0 {
return ctrl.Result{}, fmt.Errorf("failed to apply to all instances: %v", applyErrors)
}
return ctrl.Result{RequeueAfter: group.Spec.ResyncPeriod.Duration}, nil
}

Expand Down

0 comments on commit ed8e2ae

Please sign in to comment.