Skip to content

Commit b5024a1

Browse files
committed
deployment controller should degrade if progressing too long
1 parent 1100ac2 commit b5024a1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/operator/deploymentcontroller/deployment_controller.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,11 @@ func (c *DeploymentController) syncManaged(ctx context.Context, opSpec *opv1.Ope
300300
WithMessage(msg).
301301
WithReason("Deploying")
302302
}
303+
304+
// Degrade when operator is progressing too long.
305+
if v1helpers.IsUpdatingTooLong(opStatus, c.instanceName+opv1.OperatorStatusTypeProgressing) {
306+
return fmt.Errorf("Deployment was progressing too long")
307+
}
303308
status = status.WithConditions(progressingCondition)
304309
}
305310

0 commit comments

Comments
 (0)