When doing `kubectl edit clusterversions` with an upstream kubectl (or enabled client side validation in oc), one gets: # 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. # # clusterversions.config.openshift.io "version" was not valid: # * : Invalid value: "The edited file failed validation": ValidationError(ClusterVersion.status): missing required field "availableUpdates" in io.openshift.config.v1.ClusterVersion.status # apiVersion: config.openshift.io/v1 kind: ClusterVersion metadata: creationTimestamp: "2019-11-27T17:35:03Z" generation: 4 name: version resourceVersion: "47107" selfLink: /apis/config.openshift.io/v1/clusterversions/version uid: 21a49c2c-e43d-4fcc-8af1-363222577b1a spec: channel: stable-4.3 clusterID: d7300062-09bc-4250-ab0a-777d2970cc3c overrides: - group: apps/v1 kind: Deployment name: openshift-kube-apiserver-operator namespace: kube-apiserver-operator unmanaged: true upstream: https://api.openshift.com/api/upgrades_info/v1/graph status: availableUpdates: null conditions: - lastTransitionTime: "2019-11-27T17:53:30Z" message: Done applying 0.0.1-2019-11-27-172000 status: "True" type: Available ...
Compare https://github.com/openshift/api/blob/master/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml#L153. To work around, publishing has to strip nullable fields from the `required` slice, such that client-side validation does not break.
Can't reproduce the issue now: [root@dhcp-140-138 oc]# oc version -o yaml clientVersion: buildDate: "2020-02-13T22:50:14Z" compiler: gc gitCommit: 5d7a12f03389b03b651f963cb5ee8ddfa9cff559 gitTreeState: clean gitVersion: v4.4.0 goVersion: go1.13.4 major: "" minor: "" platform: linux/amd64 oc edit clusterversion --validate=true # 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. # apiVersion: config.openshift.io/v1 kind: ClusterVersion metadata: creationTimestamp: "2020-02-14T01:21:18Z" generation: 1 name: version resourceVersion: "74494" selfLink: /apis/config.openshift.io/v1/clusterversions/version uid: 82619ef2-69ad-4fb9-9361-db07f0613e9f spec: channel: stable-4.4 clusterID: b5a607cf-8869-43c3-b1e2-d45ef51c5170 upstream: https://api.openshift.com/api/upgrades_info/v1/graph status: availableUpdates: null conditions: - lastTransitionTime: "2020-02-14T01:46:28Z" message: Done applying 4.4.0-0.nightly-2020-02-13-185851 status: "True" type: Available - lastTransitionTime: "2020-02-14T01:32:43Z" "/tmp/oc-edit-vhosr.yaml" 50L, 1903C
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:0581