Skip to content

Commit

Permalink
Merge pull request #979 from openshift-cherrypick-robot/cherry-pick-9…
Browse files Browse the repository at this point in the history
…71-to-release-4.1

Bug 1743748:  Report `Upgradeable` in ClusterOperator status
  • Loading branch information
openshift-merge-robot authored Aug 26, 2019
2 parents 2d20385 + d3de8f9 commit 7694055
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/lib/operatorstatus/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ func MonitorClusterStatus(name string, syncCh chan error, stopCh <-chan struct{}
Status: configv1.ConditionFalse,
LastTransitionTime: metav1.Now(),
},
{
Type: configv1.OperatorUpgradeable,
Status: configv1.ConditionFalse,
LastTransitionTime: metav1.Now(),
},
},
},
})
Expand Down Expand Up @@ -138,6 +143,10 @@ func MonitorClusterStatus(name string, syncCh chan error, stopCh <-chan struct{}
Type: configv1.OperatorAvailable,
Status: configv1.ConditionTrue,
})
setOperatorStatusCondition(&existing.Status.Conditions, configv1.ClusterOperatorStatusCondition{
Type: configv1.OperatorUpgradeable,
Status: configv1.ConditionTrue,
})
// we set the versions array when all the latest code is deployed and running - in this case,
// the sync method is responsible for guaranteeing that happens before it returns nil
if len(targetOperatorVersion) > 0 {
Expand Down Expand Up @@ -172,6 +181,11 @@ func MonitorClusterStatus(name string, syncCh chan error, stopCh <-chan struct{}
Status: configv1.ConditionFalse,
Message: fmt.Sprintf("Waiting to see update %s succeed", olmversion.OLMVersion),
})
setOperatorStatusCondition(&existing.Status.Conditions, configv1.ClusterOperatorStatusCondition{
Type: configv1.OperatorUpgradeable,
Status: configv1.ConditionFalse,
Message: "Waiting for updates to take effect",
})
// TODO: use % errors within a window to report available
}

Expand Down

0 comments on commit 7694055

Please sign in to comment.