Skip to content

Commit b2735c8

Browse files
committed
Remove code to reset previous error while reconciling custom resource
Previous failure condition status is set to false when subsequent reconcile begins. This is unnecessary since the conditions are true at the time of reporting. The failure condition can however, be reset when reconcile completes successfully. Signed-off-by: Edmund Ochieng <[email protected]>
1 parent 9bd3f56 commit b2735c8

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

internal/ansible/controller/reconcile.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,6 @@ func (r *AnsibleOperatorReconciler) markRunning(ctx context.Context, nn types.Na
302302
crStatus := getStatus(u)
303303

304304
// If there is no current status add that we are working on this resource.
305-
errCond := ansiblestatus.GetCondition(crStatus, ansiblestatus.FailureConditionType)
306-
if errCond != nil {
307-
errCond.Status = v1.ConditionFalse
308-
ansiblestatus.SetCondition(&crStatus, *errCond)
309-
}
310305
successCond := ansiblestatus.GetCondition(crStatus, ansiblestatus.SuccessfulConditionType)
311306
if successCond != nil {
312307
successCond.Status = v1.ConditionFalse

0 commit comments

Comments
 (0)