Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New Kubernetes ConfigMap from file - plus sign?

Tags:

kubernetes

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.

like image 460
changingrainbows Avatar asked Sep 10 '25 17:09

changingrainbows


1 Answers

|+ 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: ...
like image 192
Janos Lenart Avatar answered Sep 13 '25 08:09

Janos Lenart