pkg/operator: set initial "Upgradeable" status condition
Set the "Upgradeable" status condition on the "machine-config"
ClusterOperator resource to "Unknown" during initialization. The
CVO treats an "Upgradeable" status condition of "Unknown" the same
as it does one that is not set, therefore this change should have
no affect on cluster behavior.
@@ -200,9 +200,15 @@ func (optr *Operator) initializeClusterOperator() (*configv1.ClusterOperator, er
if err != nil {
return nil, err
}
- cov1helpers.SetStatusCondition(&co.Status.Conditions, configv1.ClusterOperatorStatusCondition{Type: configv1.OperatorAvailable, Status: configv1.ConditionFalse})
- cov1helpers.SetStatusCondition(&co.Status.Conditions, configv1.ClusterOperatorStatusCondition{Type: configv1.OperatorProgressing, Status: configv1.ConditionFalse})
- cov1helpers.SetStatusCondition(&co.Status.Conditions, configv1.ClusterOperatorStatusCondition{Type: configv1.OperatorDegraded, Status: configv1.ConditionFalse})
+ cov1helpers.SetStatusCondition(&co.Status.Conditions, configv1.ClusterOperatorStatusCondition{
+ Type: configv1.OperatorAvailable, Status: configv1.ConditionFalse})
+ cov1helpers.SetStatusCondition(&co.Status.Conditions, configv1.ClusterOperatorStatusCondition{
+ Type: configv1.OperatorProgressing, Status: configv1.ConditionFalse})
+ cov1helpers.SetStatusCondition(&co.Status.Conditions, configv1.ClusterOperatorStatusCondition{
+ Type: configv1.OperatorDegraded, Status: configv1.ConditionFalse})
+ cov1helpers.SetStatusCondition(&co.Status.Conditions, configv1.ClusterOperatorStatusCondition{
+ Type: configv1.OperatorUpgradeable, Status: configv1.ConditionUnknown, Reason: "NoData"})
+
// RelatedObjects are consumed by https://github.com/openshift/must-gather
co.Status.RelatedObjects = []configv1.ObjectReference{
{Resource: "namespaces", Name: optr.namespace},
