Skip to content

Commit

Permalink
Merge pull request #371 from awgreene/remove-operator-exited-message
Browse files Browse the repository at this point in the history
Bug 1909217: Do not report degraded when Marketplace exits gracefully
  • Loading branch information
openshift-merge-robot committed Jan 15, 2021
2 parents 9fac2af + 888287e commit 36a5ea9
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions pkg/status/status.go
Expand Up @@ -251,22 +251,7 @@ func (r *reporter) monitorClusterStatus() {
}
select {
case <-r.stopCh:
// If the stopCh is closed, set all ClusterOperatorStatus conditions to false.
reason := "OperatorExited"
msg := "The operator has exited"
conditionListBuilder := clusterStatusListBuilder()
conditionListBuilder(configv1.OperatorProgressing, configv1.ConditionFalse, msg, reason)
conditionListBuilder(configv1.OperatorAvailable, configv1.ConditionFalse, msg, reason)
if operatorUpgradeable {
conditionListBuilder(configv1.OperatorUpgradeable, configv1.ConditionTrue, upgradeableMessage, reason)
} else {
conditionListBuilder(configv1.OperatorUpgradeable, configv1.ConditionFalse, deprecatedAPIMessage, "DeprecatedAPIsInUse")
}
statusConditions := conditionListBuilder(configv1.OperatorDegraded, configv1.ConditionFalse, msg, reason)
statusErr := r.setStatus(statusConditions)
if statusErr != nil {
log.Error("[status] " + statusErr.Error())
}
log.Info("[status] Operator no longer reporting status")
return
// Attempt to update the ClusterOperator status whenever the seconds
// number of seconds defined by coStatusReportInterval passes.
Expand Down Expand Up @@ -309,6 +294,7 @@ func (r *reporter) monitorClusterStatus() {
} else {
conditionListBuilder(configv1.OperatorUpgradeable, configv1.ConditionFalse, deprecatedAPIMessage, "DeprecatedAPIsInUse")
}
conditionListBuilder(configv1.OperatorDegraded, configv1.ConditionFalse, fmt.Sprintf("Available 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
Expand Down

0 comments on commit 36a5ea9

Please sign in to comment.