Hide Forgot
Description of problem: Create a configmap from a properties file but when try to edit the config map after the creation, the data is are not well formatted. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. oc create configmap mytest --from-file=mytest.properties 2. 3. Actual results: Data is not is proper format when creating a configmap from file. Expected results: It should be similar to what we provide in the file. Additional info:
This is working as expected, this is how the data in a file gets serialized into the stored config map. It is hard to edit this using oc edit. We should consider whether there is an easier way to let someone edit the content of a particular key in a config map. But that would be an RFE for a new command. Alternatively you can use oc extract to get the content back out in its original format. We are also working on support for config maps in the management console which will provide a generally easier editing experience for config maps https://trello.com/c/gUzfL5OA https://github.com/openshift/origin-web-console/pull/856
This is getting formatted as a double quoted scalar instead of a literal scalar (http://www.yaml.org/spec/1.2/spec.html#id2760844). It is the gopkg.in/yaml.v2 library that is doing it. Not sure exactly why, but I'd guess there's something about the content of this particular file that requires the output use double quotes.
Related upstream proposal: https://github.com/kubernetes/kubernetes/issues/37965
This bug has been identified as a dated (created more than 3 months ago) bug. This bug has been triaged (has a trello card linked to it), or reviewed by Engineering/PM and has been put into the product backlog, however this bug has not been slated for a currently planned release (3.9, 3.10 or 3.11), which cover our releases for the rest of the calendar year. As a result of this bugs age, state on the current roadmap and PM Score (being below 70), this bug is being Closed - Differed, as it is currently not part of the products immediate priorities. Please see: https://docs.google.com/document/d/1zdqF4rB3ea8GmVIZ7qWCVYUaQ7-EexUrQEF0MTwdDkw/edit for more details.