New Kubernetes ConfigMap from file - plus sign?

4/3/2017

Just ran the following command to create a new ConfigMap from a file:
kubernetes create configmap foo --from-file=foo

It gets created successfully.

Now when I run,
kubernetes get configmaps foo -o yaml

I see the following lines in the resulting output:

apiVersion: v1
data:
  foo: |+
    VAR1=value1
    VAR2=value2

What does the plus sign in this line mean?
foo: |+

It doesn't appear in any of my other ConfigMaps.

-- changingrainbows
kubernetes

1 Answer

4/3/2017

|+ is not kubernetes specific, it's part of yaml.

From http://lzone.de/cheat-sheet/YAML:

# + indicator (keep extra newlines after block)
content: |+
   Arbitrary free text with two newlines after


foo: ...
-- Janos Lenart
Source: StackOverflow