Caner
Caner

Reputation: 59198

What does "|-" mean in a kubernetes config file

For example, in the following secret file(example taken from here):

apiVersion: v1
kind: Secret
metadata:
  name: mysecret
type: Opaque
stringData:
  config.yaml: |-
    apiUrl: "https://my.api.com/api/v1"
    username: {{username}}
    password: {{password}}

What does |- mean?

Upvotes: 4

Views: 174

Answers (1)

Nagesh Salunke
Nagesh Salunke

Reputation: 1288

That is Block Chomping Indicator from yaml spec.
Reference : https://yaml.org/spec/1.2/spec.html#id2794534

|-
"strip": remove the line feed, remove the trailing blank lines from the block.

Upvotes: 3

Related Questions