Template

Overwrite the default template files.

Change the default templates mounting a new template file using a ConfigMap. Note that in the current version, updates to the ConfigMap will not update the in-memory parsed template.

All templates support Sprig template library. This library provides a group of commonly used template functions to work with dictionaries, lists, math etc.

Overwriting a template file:

  • The links below reference the master branch, change to the same tag of your HAProxy Ingress version.
  • Change to the Raw view
  • Copy the whole file and edit it to fit your needs
  • Paste the content to a ConfigMap, use the file name as the content key
  • Mount the ConfigMap into the Mounting directory (see below) of the HAProxy Ingress pod
Mounting directory (v0.11+) ConfigMap keys Source (v0.11+) Source (up to v0.10)
/etc/templates/haproxy haproxy.tmpl haproxy.tmpl haproxy.tmpl
/etc/templates/modsecurity modsecurity.tmpl modsecurity.tmpl spoe-modsecurity.tmpl