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
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