Skip to content

Instantly share code, notes, and snippets.

@zmx
Created January 16, 2024 06:40
Show Gist options
  • Save zmx/3468ee11b0802f2ef66b578f1e2801c0 to your computer and use it in GitHub Desktop.
Save zmx/3468ee11b0802f2ef66b578f1e2801c0 to your computer and use it in GitHub Desktop.
Helm template ignore {{expr}}
# A viable hack is to let Helm render the template as a raw string.
# Note the opening and closing curly bracket with a backtick:
#
# Origin: https://github.com/helm/helm/issues/2798#issuecomment-470435015
#
# Excerpt from a Prometheus Alertmanager yaml
receivers:
- name: slack-receiver
slack_configs:
- text: |-
{{`{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }}
{{ end }}`}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment