New controllers should report their statuses (progressing, available, degraded) and these statuses should be aggregated into the ClusterOperator object. For example: https://github.com/openshift/cluster-openshift-apiserver-operator/blob/480533b034cc4fb512c5841bbec8fb13921c5526/vendor/github.com/openshift/library-go/pkg/operator/resourcesynccontroller/resourcesync_controller.go#L192-L212 Also: https://github.com/openshift/library-go/blob/d3cb092fabfda98fbbe30db302674c34e9eafdc7/pkg/operator/status/status_controller.go#L56
How to test it: 1. the config.imageregistry/cluster should have more conditions with name "...Degraded" 2. edit imagepruner and use invalid schedule "foo" or "* * *"; imagepruner should have a degraded condition, clusteroperator/image-registry should be Degraded.
ImagePrunerDegraded appears if set invalid schedule "foo" or "* * *" to imagepruners config with 4.5.0-0.nightly-2020-05-26-224432: Status: Conditions: Last Transition Time: 2020-05-27T01:54:12Z Message: Available: The registry is ready ImagePrunerAvailable: Pruner CronJob has been created Reason: Ready Status: True Type: Available Last Transition Time: 2020-05-27T02:58:35Z Message: Progressing: The registry is ready Reason: Ready Status: False Type: Progressing Last Transition Time: 2020-05-27T03:03:57Z Message: ImagePrunerDegraded: Error: unable to apply objects: failed to update object *v1beta1.CronJob, Namespace=openshift-image-registry, Name=image-pruner: CronJob.batch "image-pruner" is invalid: spec.schedule: Invalid value: "foo": Expected exactly 5 fields, found 1: foo Reason: ImagePrunerSyncError 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-2020:2409