Skip to content

Commit

Permalink
Mark aggregated condition ready only when No error happened
Browse files Browse the repository at this point in the history
  • Loading branch information
nan-yu committed Mar 6, 2020
1 parent a3b16d8 commit 179d1c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/application_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (r *ApplicationReconciler) getNewApplicationStatus(ctx context.Context, app
Objects: objectStatuses,
}
newApplicationStatus.ComponentsReady = fmt.Sprintf("%d/%d", countReady, len(objectStatuses))
if aggReady && errs != nil {
if aggReady && errs == nil {
setReadyCondition(newApplicationStatus, "ComponentsReady", "all components ready")
} else {
setNotReadyCondition(newApplicationStatus, "ComponentsNotReady", "some components not ready")
Expand Down

0 comments on commit 179d1c0

Please sign in to comment.