I believe we already define a Reason if the operator encounters an error. See the following from the cluster storage operator. This is in release-4.1 and subsequent versions: // if error is anything other than unsupported platform, we are degraded if err != nil { if err != unsupportedPlatformError { degraded := configv1.ClusterOperatorStatusCondition{ Type: configv1.OperatorDegraded, Status: configv1.ConditionTrue, Reason: "Error", Message: err.Error(), } I have submitted https://github.com/openshift/cluster-storage-operator/pull/46 to include default Reason strings on the other statuses.
Verified with: 4.2.0-0.nightly-2019-08-26-202352 $ oc get co storage NAME VERSION AVAILABLE PROGRESSING DEGRADED SINCE storage 4.2.0-0.nightly-2019-08-26-202352 False False True 56s $ oc describe co storage|grep Degraded -B 5 Type: Available Last Transition Time: 2019-08-27T05:47:36Z Message: storageclasses.storage.k8s.io is forbidden: User "system:serviceaccount:openshift-cluster-storage-operator:cluster-storage-operator" cannot create resource "storageclasses" in API group "storage.k8s.io" at the cluster scope Reason: Error Status: True Type: Degraded
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:2922