Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions internal/controller/helmrelease_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ func (r *HelmReleaseReconciler) reconcileRelease(ctx context.Context,

log := ctrl.LoggerFrom(ctx)

// Snapshot the object's readiness state to detect failure recovery.
wasNotReady := !conditions.IsReady(obj)

// Check deprecated fields.
if obj.GetRollback().Recreate {
log.Info("warning: the .spec.rollback.recreate field is deprecated and has no effect. " +
Expand Down Expand Up @@ -441,6 +444,13 @@ func (r *HelmReleaseReconciler) reconcileRelease(ctx context.Context,
}
return ctrl.Result{}, err
}

// Emit recovery event if the release was not ready before and is now ready.
if wasNotReady && conditions.IsReady(obj) {
r.Eventf(obj, corev1.EventTypeNormal, meta.SucceededReason,
"Release reconciliation recovered from previous failure")
}

return jitter.JitteredRequeueInterval(ctrl.Result{RequeueAfter: obj.GetRequeueAfter()}), nil
}

Expand Down