Under the covers oc silently updates group field for every resource. For example apiVersion: v1 becomes apiVersion: apps.openshift.io/v1 for DeploymentConfig. We want to eventually remove that carry patch which allows us to perform these but we need to warn users sufficiently long about that fact. This applies only to OpenShift specific resources.
PR in the queue.
Could see the warn : [root@dhcp-140-138 ~]# oc version Client Version: 4.7.0-202102032256.p0-c66c03f Server Version: 4.7.0-0.nightly-2021-02-03-165316 Kubernetes Version: v1.20.0+e761892 [root@dhcp-140-138 ~]# cat /tmp/dc.yaml apiVersion: v1 kind: DeploymentConfig metadata: name: dctest spec: replicas: 1 revisionHistoryLimit: 10 selector: ..... [root@dhcp-140-138 ~]# oc annotate -f /tmp/dc.yaml x=y W0204 11:23:55.390866 14483 shim_kubectl.go:55] Using non-groupfied API resources is deprecated and will be removed in a future release, update apiVersion to "apps.openshift.io/v1" for your resource deploymentconfig.apps.openshift.io/dctest annotated [root@dhcp-140-138 ~]# oc get dc dctest -o yaml apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: annotations: x: "y" creationTimestamp: "2021-02-04T03:10:36Z" generation: 1 managedFields: .... - apiVersion: apps.openshift.io/v1 fieldsType: FieldsV1 fieldsV1: f:metadata: f:annotations: .: {} f:x: {} manager: kubectl-annotate operation: Update time: "2021-02-04T03:23:56Z" name: dctest namespace: zhouyt resourceVersion: "66592" uid: 6fd8d02b-4b59-4b9d-ad3d-ec5c61abd0a7 ....
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