Skip to content

Commit ed8e2ae

Browse files
authored
Merge pull request #1625 from grafana/fix/backoff-requeue-on-failed-sync
fix: requeue on apply errors
2 parents 4801274 + df14c74 commit ed8e2ae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

controllers/grafanaalertrulegroup_controller.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ func (r *GrafanaAlertRuleGroupReconciler) Reconcile(ctx context.Context, req ctr
143143
}
144144
condition := buildSynchronizedCondition("Alert Rule Group", conditionAlertGroupSynchronized, group.Generation, applyErrors, len(instances))
145145
meta.SetStatusCondition(&group.Status.Conditions, condition)
146-
146+
if len(applyErrors) > 0 {
147+
return ctrl.Result{}, fmt.Errorf("failed to apply to all instances: %v", applyErrors)
148+
}
147149
return ctrl.Result{RequeueAfter: group.Spec.ResyncPeriod.Duration}, nil
148150
}
149151

0 commit comments

Comments
 (0)