File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ import (
2323 "sigs.k8s.io/yaml"
2424)
2525
26+ const (
27+ progressingConditionTimeout = 15 * time .Minute
28+ )
29+
2630// SetOperandVersion sets the new version and returns the previous value.
2731func SetOperandVersion (versions * []configv1.OperandVersion , operandVersion configv1.OperandVersion ) string {
2832 if versions == nil {
@@ -555,5 +559,5 @@ func IsConditionPresentAndEqual(conditions []metav1.Condition, conditionType str
555559// it returns true if the progressing condition has been set to True for at least 15 minutes
556560func IsUpdatingTooLong (operatorStatus * operatorv1.OperatorStatus , progressingConditionType string ) (bool , error ) {
557561 progressing := FindOperatorCondition (operatorStatus .Conditions , progressingConditionType )
558- return progressing != nil && progressing .Status == operatorv1 .ConditionTrue && time .Now ().After (progressing .LastTransitionTime .Add (15 * time . Minute )), nil
562+ return progressing != nil && progressing .Status == operatorv1 .ConditionTrue && time .Now ().After (progressing .LastTransitionTime .Add (progressingConditionTimeout )), nil
559563}
You can’t perform that action at this time.
0 commit comments