Skip to content

Commit 74264cf

Browse files
committed
review comment
1 parent fe2d85e commit 74264cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/controller/appwrapper_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,12 @@ func (r *AppWrapperReconciler) Reconcile(ctx context.Context, req ctrl.Request)
181181
if err != nil {
182182
return ctrl.Result{}, err
183183
}
184-
if podStatus.succeeded >= podStatus.expected && (podStatus.pending+podStatus.running == 0) {
184+
if podStatus.succeeded >= podStatus.expected && (podStatus.pending+podStatus.running+podStatus.failed == 0) {
185185
meta.SetStatusCondition(&aw.Status.Conditions, metav1.Condition{
186186
Type: string(workloadv1beta2.QuotaReserved),
187187
Status: metav1.ConditionFalse,
188188
Reason: string(workloadv1beta2.AppWrapperSucceeded),
189-
Message: fmt.Sprintf("%v pods succeeded and no running or pending pods", podStatus.succeeded),
189+
Message: fmt.Sprintf("%v pods succeeded and no running, pending, or failed pods", podStatus.succeeded),
190190
})
191191
return r.updateStatus(ctx, aw, workloadv1beta2.AppWrapperSucceeded)
192192
}

0 commit comments

Comments
 (0)