相关疑难解决方法(0)

helm 语法 {{ Something }} 和 {{- Something }} 有什么区别?

我试图理解 helm 模板并发现如下语法:

  {{- if not .Values.autoscaling.enabled }}
  replicas: {{ .Values.replicaCount }}
  {{- end }}
Run Code Online (Sandbox Code Playgroud)

所以我认为每件事都必须从以下开始{{-,但后来我发现其他语法没有该语法:

        - name: {{ .Chart.Name }}
Run Code Online (Sandbox Code Playgroud)

So my question is what is the difference between those two syntaxs? What does the dash do? When is it needed?

kubernetes-helm

33
推荐指数
1
解决办法
2万
查看次数

标签 统计

kubernetes-helm ×1