Skip to content

Commit

Permalink
clusteroperator: Don't block on failing during initialization
Browse files Browse the repository at this point in the history
If the operator reports level and is available, we're good to go.
  • Loading branch information
smarterclayton committed Mar 13, 2019
1 parent 3668cfa commit b0b4902
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions pkg/cvo/internal/operatorstatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,19 @@ func waitForOperatorStatusToBeDone(ctx context.Context, interval time.Duration,
failing = false
}
}
// if we're at the correct version, and available, and not failing, we are done
// if we're available, not failing, and not progressing, we're also done
// TODO: remove progressing once all cluster operators report expected versions
if available && (!progressing || len(expected.Status.Versions) > 0) && !failing {
return true, nil
switch mode {
case resourcebuilder.InitializingMode:
// during initialization we allow failing as long as the component goes available
if available && (!progressing || len(expected.Status.Versions) > 0) {
return true, nil
}
default:
// if we're at the correct version, and available, and not failing, we are done
// if we're available, not failing, and not progressing, we're also done
// TODO: remove progressing once all cluster operators report expected versions
if available && (!progressing || len(expected.Status.Versions) > 0) && !failing {
return true, nil
}
}

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

0 comments on commit b0b4902

Please sign in to comment.