I am trying to create ConfigMap in OpenShift by using YAML file.
My YAML is having a list of values as below.
kind: ConfigMap
apiVersion: v1
metadata:
  name: sample-map-json-fields
  namespace: default
data:
  fields:
    - hello
    - world
    - my.test.field
I executed like below -
 oc create -f filename.yaml
Getting exception like below -
Error from server (BadRequest): error when creating "filename.yaml": ConfigMap in version "v1" cannot be handled as a ConfigMap: [pos 42]: json: expect char '"' but got char '['
If I do the same without list content inside data, it works.
Please help how to handle the YAML list for ConfigMap.
 
    