Skip to content

Commit

Permalink
Merge pull request #347 from ankitathomas/marketplace-upgrade-fix
Browse files Browse the repository at this point in the history
Bug 1885376: Remove condition around marketplace OperatorAvailable status update
  • Loading branch information
openshift-merge-robot committed Oct 8, 2020
2 parents 8c94fbb + 0acb44b commit b2c7a7a
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions pkg/status/status.go
Expand Up @@ -125,7 +125,7 @@ func (r *reporter) setStatusCondition(statusCondition configv1.ClusterOperatorSt
func (r *reporter) updateStatus(previousStatus *configv1.ClusterOperatorStatus) error {
var err error
if compareClusterOperatorStatusConditionArrays(previousStatus.Conditions, r.clusterOperator.Status.Conditions) {
log.Debugf("[status] Previous and current ClusterOperator Status are the same, the ClusterOperator Status will not be updated.")
log.Infof("[status] Previous and current ClusterOperator Status are the same, the ClusterOperator Status will not be updated.")
} else {
log.Debugf("[status] Previous and current ClusterOperator Status are different, attempting to update the ClusterOperator Status.")

Expand Down Expand Up @@ -225,14 +225,11 @@ func (r *reporter) monitorClusterStatus() {
}

// Report that marketplace is available
if cohelpers.IsStatusConditionFalse(r.clusterOperator.Status.Conditions, configv1.OperatorAvailable) {
reason := "OperatorAvailable"
conditionListBuilder := clusterStatusListBuilder()
conditionListBuilder(configv1.OperatorProgressing, configv1.ConditionFalse, fmt.Sprintf("Successfully progressed to release version: %s", r.version), reason)
statusConditions := conditionListBuilder(configv1.OperatorAvailable, configv1.ConditionTrue, fmt.Sprintf("Available release version: %s", r.version), reason)
statusErr = r.setStatus(statusConditions)
break
}
reason := "OperatorAvailable"
conditionListBuilder := clusterStatusListBuilder()
conditionListBuilder(configv1.OperatorProgressing, configv1.ConditionFalse, fmt.Sprintf("Successfully progressed to release version: %s", r.version), reason)
statusConditions := conditionListBuilder(configv1.OperatorAvailable, configv1.ConditionTrue, fmt.Sprintf("Available release version: %s", r.version), reason)
statusErr = r.setStatus(statusConditions)
}
}
}
Expand Down

0 comments on commit b2c7a7a

Please sign in to comment.