Bug 1914894

Summary: Warn about using non-groupified api version
Product: OpenShift Container Platform Reporter: Maciej Szulik <maszulik>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: aos-bugs, jokerman, mfojtik
Target Milestone: ---Keywords: UpcomingSprint
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 15:51:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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
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
....

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.

https://access.redhat.com/errata/RHSA-2020:5633