Bug 1396435

Summary: ConfigMap from file are not well created
Product: OpenShift Container Platform Reporter: Jaspreet Kaur <jkaur>
Component: RFEAssignee: Fabiano Franz <ffranz>
Status: CLOSED DEFERRED QA Contact: Xingxing Xia <xxia>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.3.1CC: aos-bugs, jforrest, jkaur, jokerman, jvallejo, mbarrett, mmccomas, thomas.escalle
Target Milestone: ---Flags: erich: needinfo? (jkaur)
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-12 13:54:36 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:

Description Jaspreet Kaur 2016-11-18 10:10:31 UTC
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:

Comment 3 Jessica Forrester 2016-11-18 14:03:57 UTC
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

Comment 4 Andy Goldstein 2016-11-18 14:28:23 UTC
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.

Comment 5 Juan Vallejo 2016-12-02 18:18:33 UTC
Related upstream proposal: https://github.com/kubernetes/kubernetes/issues/37965

Comment 7 Eric Rich 2018-03-12 13:54:36 UTC
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.