Helm
Hard
Templates
Which function trims trailing newlines from a string in templates?
Select your answer:
Show answer and explanation
Answer: trimSuffix "\n"
Explanation
Helm has no chomp or stripNewline function. trimSuffix "\n" removes one trailing newline, and trim removes all leading and trailing whitespace, newlines included. nindent does the opposite: it adds a newline and indentation.
More hard Helm questions
- How can you override a nested map value via the command line?
- Which setting would you use to make a template helper available to child charts (subcharts)?
- Which Helm feature helps ensure chart values conform to a schema (like types and required fields)?
- Which Helm feature can help modify rendered manifests before they are applied to the cluster?
- Which command explains why a resource failed during a helm install by showing events/logs (combining kubectl)?
- Which field in a hook's annotations sets a timeout for hook execution?