Description of problem: oc get -o yaml --export -n openshift imagestream jenkins returns yaml with namespace: default. --export generally should not return a namespace. root@ip-172-31-36-114: ~/svt/conformance # oc get -n openshift -o yaml --export is/jenkins | less apiVersion: image.openshift.io/v1 kind: ImageStream metadata: annotations: openshift.io/display-name: Jenkins openshift.io/image.dockerRepositoryCheck: 2018-02-05T13:04:24Z creationTimestamp: null generation: 1 name: jenkins namespace: default selfLink: /apis/image.openshift.io/v1/namespaces/default/imagestreams/jenkins Leaving --export off returns the correct namespace: root@ip-172-31-36-114: ~/svt/conformance # oc get -n openshift -o yaml is/jenkins | less apiVersion: image.openshift.io/v1 kind: ImageStream metadata: annotations: openshift.io/display-name: Jenkins openshift.io/image.dockerRepositoryCheck: 2018-02-05T13:04:24Z creationTimestamp: 2018-02-05T13:04:19Z generation: 2 name: jenkins namespace: openshift resourceVersion: "890" selfLink: /apis/image.openshift.io/v1/namespaces/openshift/imagestreams/jenkins uid: 13b81fe9-0a75-11e8-af2c-022c90aeb698 Version-Release number of selected component (if applicable): 3.9.0-0.36.0 How reproducible: Always Steps to Reproduce: 1. Install 3.9.0-0.36.0 using openshift-ansible 2. See above for commands Actual results: yaml output when --export option is specified contains incorrect namespaces Expected results: Correct yaml that can be used to replace a resource.
Able to reproduce this on a 3.9 client against a 3.9 server. Origin PR: https://github.com/openshift/origin/pull/18487
@mifiedler can you post the version of the client that you are using? Also, could you provide the --loglevel=8 output of `oc get -n openshift -o yaml --export`?
Originally reported with client 3.6.0-0.36.0. Reproduced below with 3.6.0-0.38.0 and loglevel=8 # oc version oc v3.9.0-0.38.0 kubernetes v1.9.1+a0ce1bc657 features: Basic-Auth GSSAPI Kerberos SPNEGO Server https://ip-172-31-0-243.us-west-2.compute.internal:8443 openshift v3.9.0-0.38.0 kubernetes v1.9.1+a0ce1bc657 # oc get -o yaml --loglevel=8 --export -n openshift imagestream jenkins > oc_export_is.out 2>&1 Output attached.
Created attachment 1392784 [details] oc get -o yaml --loglevel=8 --export -n openshift imagestream jenkins > oc_export_is.out 2>&1
Current namespace for repro in comment 4 was "logging"
Origin PR [1] merged. Moving to ON_QA
Moving to MODIFIED until a puddle with the change is available.
Verified on 3.9.0-0.47.0 - namespace not present when --export used. root@ip-172-31-15-225: ~ # oc get is -n openshift -o yaml --export jenkins apiVersion: image.openshift.io/v1 kind: ImageStream metadata: annotations: openshift.io/display-name: Jenkins openshift.io/image.dockerRepositoryCheck: 2018-02-21T14:48:26Z creationTimestamp: null generation: 1 name: jenkins selfLink: /apis/image.openshift.io/v1/namespaces/openshift/imagestreams/jenkins <snip>
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, 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/RHBA-2018:0489