Skip to content

Commit b0b4902

Browse files
clusteroperator: Don't block on failing during initialization
If the operator reports level and is available, we're good to go.
1 parent 3668cfa commit b0b4902

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

pkg/cvo/internal/operatorstatus.go

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,19 @@ func waitForOperatorStatusToBeDone(ctx context.Context, interval time.Duration,
183183
failing = false
184184
}
185185
}
186-
// if we're at the correct version, and available, and not failing, we are done
187-
// if we're available, not failing, and not progressing, we're also done
188-
// TODO: remove progressing once all cluster operators report expected versions
189-
if available && (!progressing || len(expected.Status.Versions) > 0) && !failing {
190-
return true, nil
186+
switch mode {
187+
case resourcebuilder.InitializingMode:
188+
// during initialization we allow failing as long as the component goes available
189+
if available && (!progressing || len(expected.Status.Versions) > 0) {
190+
return true, nil
191+
}
192+
default:
193+
// if we're at the correct version, and available, and not failing, we are done
194+
// if we're available, not failing, and not progressing, we're also done
195+
// TODO: remove progressing once all cluster operators report expected versions
196+
if available && (!progressing || len(expected.Status.Versions) > 0) && !failing {
197+
return true, nil
198+
}
191199
}
192200

193201
if c := resourcemerge.FindOperatorStatusCondition(actual.Status.Conditions, configv1.OperatorFailing); c != nil && c.Status == configv1.ConditionTrue {

0 commit comments

Comments
 (0)