Description of problem: Get the below limitation when updating an OperatorCondition resource. # Please edit the object below. Lines beginning with a '#' will be ignored, # and an empty file will abort the edit. If an error occurs while saving this file will be # reopened with the relevant failures. # # operatorconditions.operators.coreos.com "etcdoperator.v0.9.4" was not valid: # * spec.overrides.lastTransitionTime: Required value # * spec.overrides.message: Required value # * spec.overrides.reason: Required value As the https://github.com/operator-framework/olm-docs/blob/master/content/en/docs/advanced-tasks/communicating-operator-conditions-to-olm.md#example-override shows, these below fields should be optional, not required # * spec.overrides.lastTransitionTime: Required value # * spec.overrides.message: Required value # * spec.overrides.reason: Required value Version-Release number of selected component (if applicable): Cluster version is 4.7.0-0.nightly-2020-12-09-112139 [root@preserve-olm-env data]# oc -n openshift-operator-lifecycle-manager exec catalog-operator-5bff7985dc-qmnqk -- olm --version OLM version: 0.17.0 git commit: 2294bcc907c834c160c5b99fbf15988d0706853c How reproducible: always Steps to Reproduce: 1. Install OCP 4.7. 2. Subscribe an operator, such as, etcd [root@preserve-olm-env data]# oc get sub -A NAMESPACE NAME PACKAGE SOURCE CHANNEL default etcd etcd community-operators singlenamespace-alpha [root@preserve-olm-env data]# oc get csv -n default NAME DISPLAY VERSION REPLACES PHASE etcdoperator.v0.9.4 etcd 0.9.4 etcdoperator.v0.9.2 Succeeded 3. Add the `overrides` to this operatorcondition resource manually. [root@preserve-olm-env data]# oc get operatorcondition NAME AGE etcdoperator.v0.9.4 6h23m [root@preserve-olm-env data]# oc edit operatorcondition etcdoperator.v0.9.4 ... Actual results: Get the below limations: # operatorconditions.operators.coreos.com "etcdoperator.v0.9.4" was not valid: # * spec.overrides.lastTransitionTime: Required value # * spec.overrides.message: Required value # * spec.overrides.reason: Required value Expected results: All the above fields should be optional, not required, especially the `lastTransitionTime` filed. Additional info:
This will no longer be required once the changes introduced to the CRD in this PR [1] are pulled into OLM, which will happen as a part of the kube dependency bump [2]. Ref: [1] https://github.com/operator-framework/api/pull/91 [2] https://github.com/operator-framework/operator-lifecycle-manager/pull/1903
I am not marking the message or reason fields as optional because I believe they should be required.
I have updated the example documentation in this PR: https://github.com/operator-framework/olm-docs/pull/90
The PR linked to this ticket has been merged fixing the issue.
Cluster version is 4.7.0-0.nightly-2021-01-04-215816 [root@preserve-olm-env data]# oc -n openshift-operator-lifecycle-manager exec catalog-operator-5b4b6587c4-2qgfb -- olm --version OLM version: 0.17.0 git commit: 69dc076d610b033d3964ed40c4ac27ece3424851 It works as expected. Verify it. [root@preserve-olm-env data]# oc edit operatorcondition etcdoperator.v0.9.4 operatorcondition.operators.coreos.com/etcdoperator.v0.9.4 edited ... overrides: - message: This is a known issue with the operator where it always reports that it cannot be upgraded. reason: upgradeIsSafe status: "True" type: Upgradeable # operatorconditions.operators.coreos.com "etcdoperator.v0.9.4" was not valid: # * spec.overrides.message: Required value # * spec.overrides.reason: Required value # * spec.overrides.status: Required value
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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), 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/RHSA-2020:5633