Bug 1312221

Summary: api-version does not work for filter resource by api version
Product: OKD Reporter: XiaochuanWang <xiaocwan>
Component: ocAssignee: Fabiano Franz <ffranz>
Status: CLOSED WONTFIX QA Contact: Wei Sun <wsun>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.xCC: aos-bugs, jliggitt, mfojtik, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-31 15:41:23 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 XiaochuanWang 2016-02-26 07:08:04 UTC
Description of problem:
Resource created with v1 should not be described using --api-version=v1beta3

Version-Release number of selected component (if applicable):
oc v1.1.3-282-gc423082
kubernetes v1.2.0-alpha.7-703-gbc4550d

How reproducible:
Always

Steps to Reproduce:
1. Create resource with api version is v1
`oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/networking/list_for_pods.json`
2. Use --api-version to get resource svc
`oc describe svc test-service --api-version=v1beta3`

Actual results:
# oc describe svc test-service --api-version=v1beta3 
Name:			test-service
Namespace:		xiaocwan-t
Labels:			name=test-service
Selector:		name=test-pods
Type:			ClusterIP
IP:			172.30.221.216
Port:			http	27017/TCP
Endpoints:		172.17.0.13:8080,172.17.0.14:8080
Session Affinity:	None
No events.

Expected results:
Need to pop-up error information friendly.
error: server does not support API version "v1beta3"

Additional info:

Comment 1 Fabiano Franz 2016-03-04 18:02:53 UTC
Most likely --api-version is going to be deprecated. Marking this as UpcomingRelease while we follow the discussion upstream: https://github.com/kubernetes/kubernetes/issues/14895.