Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkg/operator/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ func (optr *Operator) updateStatus(co *configv1.ClusterOperator, status configv1
return err
}

const (
failedToSyncReason = "FailedToSync"
)

// syncDegradedStatus applies the new condition to the mco's ClusterOperator object.
func (optr *Operator) syncDegradedStatus(ierr error) (err error) {
co, err := optr.fetchClusterOperator()
Expand All @@ -157,7 +161,7 @@ func (optr *Operator) syncDegradedStatus(ierr error) (err error) {
} else {
message = fmt.Sprintf("Unable to apply %s: %v", optrVersion, ierr.Error())
}
reason = ierr.Error()
reason = failedToSyncReason

// set progressing
if cov1helpers.IsStatusConditionTrue(co.Status.Conditions, configv1.OperatorProgressing) {
Expand Down