Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1354435 - oc apply needs be deprecated
Summary: oc apply needs be deprecated
Alias: None
Product: OKD
Classification: Red Hat
Component: Command Line Interface
Version: 3.x
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Juan Vallejo
QA Contact: Xingxing Xia
Depends On:
TreeView+ depends on / blocked
Reported: 2016-07-11 10:12 UTC by Xingxing Xia
Modified: 2017-07-17 05:57 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-07-14 18:46:26 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Xingxing Xia 2016-07-11 10:12:43 UTC
Description of problem:
oc apply needs be deprecated. It has nothing more useful than oc create and oc replace. It just makes customer confused that why so many overlapping oc sub-commands.

Version-Release number of selected component (if applicable):
oc v1.3.0-alpha.2-1074-g69bd399
kubernetes v1.3.0-alpha.3-599-g2746284

How reproducible:

Steps to Reproduce:
1. Compare the help info of `oc apply -h` VS `oc create -h`

Take an example of oc apply:
1> cat svc_test.yaml
apiVersion: v1
kind: Service
  name: svc-test
  - targetPort: 8080
    port: 8080
    name: web1
    protocol: TCP
    name: database

2> oc apply -f svc_test.yaml

3 Check oc apply's result
1> oc get svc svc-test -o yaml
2> From the output, compare the content in and the content of the resource

4. oc edit resource then check again 
1> oc edit svc svc-test # e.g. change targetPort: 8080 to targetPort: 8081
2> oc get svc svc-test -o yaml
3> From the output, compare the content like step 3.2 again.

Actual results:
2> What `oc apply` does is just to add one new annotation:, the content of which is just as same as the content of the resource. So, the annotation provides nothing useful at all. It just makes the resource content bulky

3> The contents are sync'ed same after any edit, again proving the annotation provides nothing useful at all

Expected results:
Deprecate oc apply from `oc help`

Additional info:
Should deprecate --saved-config from `oc create -h` too, because the flag just adds the annotation:, which is not useful as said above.

Comment 2 Juan Vallejo 2016-07-14 18:44:36 UTC
Related PR:

Comment 3 Juan Vallejo 2016-07-14 18:46:26 UTC
Closed, see:

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