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.
NoteStarting from v0.11, all template files were moved from
/etc/templates. Change to an older doc version if using HAProxy Ingress up to v0.10.
Overwriting a template file:
- The links below reference the
masterbranch, change to the same tag of your HAProxy Ingress version.
- Change to the
- 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
WarningConsider overwriting the template files as a last resort. Templates change a lot between HAProxy Ingress versions and the overwrite should be updated on every controller update. Try to use a configuration snippet instead or file a new feature request.
|Mounting directory (v0.11+)||ConfigMap keys||Source (v0.11+)||Source (up to v0.10)|