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?
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.