Bug 1914894 - Warn about using non-groupified api version
Summary: Warn about using non-groupified api version
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.7
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.7.0
Assignee: Maciej Szulik
QA Contact: zhou ying
Depends On:
TreeView+ depends on / blocked
Reported: 2021-01-11 12:42 UTC by Maciej Szulik
Modified: 2021-02-24 15:52 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Last Closed: 2021-02-24 15:51:51 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift oc pull 693 0 None closed Bug 1914894: warn users about using non-groupified resources 2021-02-19 19:15:28 UTC
Github openshift origin pull 25802 0 None closed Bug 1914894: make cmd tests more resilient 2021-02-19 19:15:28 UTC
Github openshift origin pull 25807 0 None closed Bug 1914894: make tests more resilient 2021-02-19 19:15:28 UTC
Github openshift origin pull 25826 0 None closed Bug 1914894: get stdout only when invoking oc process 2021-02-19 19:15:27 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:52:13 UTC

Description Maciej Szulik 2021-01-11 12:42:23 UTC
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.

Comment 1 Maciej Szulik 2021-01-15 12:04:57 UTC
PR in the queue.

Comment 3 zhou ying 2021-02-04 03:27:54 UTC
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
  name: dctest
  replicas: 1
  revisionHistoryLimit: 10

[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
    x: "y"
  creationTimestamp: "2021-02-04T03:10:36Z"
  generation: 1
  - apiVersion: apps.openshift.io/v1
    fieldsType: FieldsV1
          .: {}
          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

Comment 6 errata-xmlrpc 2021-02-24 15:51:51 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.