diff --git a/pkg/operator/status.go b/pkg/operator/status.go index 8e8cdd185a..ac4f7d1af9 100644 --- a/pkg/operator/status.go +++ b/pkg/operator/status.go @@ -100,15 +100,13 @@ func (optr *Operator) syncAvailableStatus() error { return nil } - optrVersion, _ := optr.vStore.Get("operator") degraded := cov1helpers.IsStatusConditionTrue(co.Status.Conditions, configv1.OperatorDegraded) - message := fmt.Sprintf("Cluster has deployed %s", optrVersion) + message := fmt.Sprintf("Cluster has deployed %s", co.Status.Versions) available := configv1.ConditionTrue if degraded { available = configv1.ConditionFalse - message = fmt.Sprintf("Cluster not available for %s", optrVersion) mcoObjectRef := &corev1.ObjectReference{ Kind: co.Kind, Name: co.Name, @@ -117,6 +115,7 @@ func (optr *Operator) syncAvailableStatus() error { } optr.eventRecorder.Eventf(mcoObjectRef, corev1.EventTypeWarning, "OperatorNotAvailable", message) + message = fmt.Sprintf("Cluster not available for %s", co.Status.Versions) } coStatus := configv1.ClusterOperatorStatusCondition{