diff --git a/api/v1/multiclusterengine_types.go b/api/v1/multiclusterengine_types.go index 5357b9cb..5e9fec7e 100644 --- a/api/v1/multiclusterengine_types.go +++ b/api/v1/multiclusterengine_types.go @@ -143,6 +143,7 @@ type PhaseType string const ( MultiClusterEnginePhaseProgressing PhaseType = "Progressing" + MultiClusterEnginePhasePaused PhaseType = "Paused" MultiClusterEnginePhaseAvailable PhaseType = "Available" MultiClusterEnginePhaseUninstalling PhaseType = "Uninstalling" MultiClusterEnginePhaseError PhaseType = "Error" diff --git a/pkg/status/status.go b/pkg/status/status.go index 2e007abe..52b01e19 100644 --- a/pkg/status/status.go +++ b/pkg/status/status.go @@ -95,6 +95,12 @@ func (sm *StatusTracker) reportConditions() []bpv1.MultiClusterEngineCondition { func (sm *StatusTracker) reportPhase(mce bpv1.MultiClusterEngine, components []bpv1.ComponentCondition, conditions []bpv1.MultiClusterEngineCondition) bpv1.PhaseType { progress := getCondition(conditions, bpv1.MultiClusterEngineProgressing) + for _, condition := range conditions { + if condition.Reason == PausedReason { + return bpv1.MultiClusterEnginePhasePaused + } + } + // If operator isn't progressing show error phase if progress != nil && progress.Status == metav1.ConditionFalse { return bpv1.MultiClusterEnginePhaseError