Hide Forgot
Description of problem: Extract a secret to a file with -o flag will failed to output the correct format for the secret, only output the secret key and missed the value. Version-Release number of selected component (if applicable): oc v1.3.0-alpha.3+7b3e38d How reproducible: Always Steps to Reproduce: 1. If there's no secret, create one with multiple data first. 2. Extract secret with different type of output # oc extract secret/default-token-4dbjd -o json # oc extract secret/default-token-4dbjd -o yaml --confirm # oc extract secret/default-token-4dbjd -o wide --confirm Actual results: Besides the 4 created file from secret data, terminal only outputs the keys of the secret no-matter what the type is given by `-o` """ service-ca.crt token ca.crt namespace """ Expected results: Besides the 4 created file from secret data, output should combine the data in correct format. Additional info: Refer to `oc run test1 --image=aos-qe/hello-openshift -o yaml`
Same flag also doesn't work for configmap # oc create configmap myconfig --from-file=/openshift.local.config/master/master-config.yaml # oc extract configmap/myconfig --confirm -o json master-config.yaml # oc extract configmap/myconfig --confirm -o yaml master-config.yaml # oc extract configmap/myconfig --confirm -o name master-config.yaml # oc extract configmap/myconfig --confirm -o wide master-config.yaml From `oc edit configmap myconfig` the format of "data" is yaml
This is working as designed. Extract retrieves file contents, which can't be converted from types.
Thx, sounds good. Now that the flags (-o, --show-labels etc.) are N/A (not applicable) for oc extract, it is better to not show them in `oc extract -h`. Other sub-commands' help info may have similar issue of N/A flags