[英]Helm chart render string with special characters
I want to render following line as string in helm chart.我想在掌舵图中将下一行渲染为字符串。 It contain special characters.
它包含特殊字符。
text: '{{ template "slack.template.text".文本:'{{ 模板“slack.template.text”。 }}'
}}'
I found the solution.我找到了解决方案。 text: '{{"{{" }} template "slack.template.text".
文本:'{{"{{" }} 模板“slack.template.text”。 {{"}}"}}'
{{"}}"}}'
you can use the {{ quote }}
function to escape special characters in a string.您可以使用
{{ quote }}
function 转义字符串中的特殊字符。
example:例子:
text: '{{ quote (template "slack.template.text" . ) }}'
you can refer: https://helm.sh/docs/chart_template_guide/function_list/#quote-and-squote可以参考: https://helm.sh/docs/chart_template_guide/function_list/#quote-and-squote
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.