helm三元表达式 ternary

{{- ternary "value-if-true" "value-if-false" condition -}}

Demo

apiVersion: v1
kind: Pod
metadata:
  name: my-pod
  labels:
    special: "{{- ternary "true" "false" .Values.enableSpecialLabel -}}"