HAProxy release notes – 2.8/stable, revision 216

These release notes cover new features and changes in HAProxy for revisions 148-216 between the dates of 2025-04-30 and 2025-08-20.

Main features:

  • Added the ingress-per-unit relation.

  • Added new field to the requirer application databag.

Main bug fixes:

  • Fixed a typo in the cookie fetch method in the load-balancing algorithm (PR).

  • Fixed an ambiguous endpoint in an integration test (PR).

See our Release policy and schedule.

Requirements and compatibility

The charm operates HAProxy v2.8.

The table below shows the required or supported versions of the software necessary to operate the charm.

Software

Required version

Juju

3.x

Terraform

1.6

Terraform Juju provider

0.19

Ubuntu

24.04

Updates

The following major and minor features were added in this release.

Add consistent hashing support

Consistent hashing reduce redistribution of clients to another backend server when server is added/removed. On HAProxy it will add

hash-type consistent

to the configuration.

Relevant links:

Allow customization to configure port for HTTP check

You can now customize the port used for http-check.

Relevant links:

Added hosts attribute to requirer data

You can now override the unit IP addresses used to generate server entries in the HAProxy configuration.

Relevant links:

Validated requirer relation data object

Validation is now done on both the requirer and provider side to check for invalid characters. On the requirer an exception will be raised while on the provider the related service will be ignored.

Relevant links:

Updated integration tests

The integration tests now only run one unit to save CI time.

Relevant links:

Updated certifications handling

The charm now requests a new certification for each subdomain during initialization.

Relevant links:

Refactored source code and tests

Several changes to the source code, integration tests, and unit tests. The reconcile function was broken into smaller modules, mode validation is now performed in a state in the charm class, some tests were migrated to jubilant, and other tests were moved to different directories.

Relevant links:

Added a new relation

Added the ingress-per-unit relation to support reaching each unit separately for a Vault deployed behind an ingress.

Relevant links:

Added new field to the requirer application databag

The requirer application databag now has a “protocol” field to support HTTPS upstream servers.

Relevant links:

Added http-server-close support

Added the http-server-close argument to the HAProxy configuration. When this argument is set, it closes the connection after the request.

Relevant links:

Enforce health check fields to all be set

To avoid any issue with partial health checks configuration, all related fields must be set for the configuration to be valid.

Relevant links:

Added first scenario test

Added the first scenario test which starts the transition process from Harness to Scenario.

Relevant links:

Rendered retry configuration in template and remove retry_interval attribute

The retry_interval attribute has been removed since there’s no way to configure that in HAProxy. To configure the time between 2 retries we can use timeout.connect.

Relevant links:

Added terraform charm and product module

You can now deploy HAProxy with high-availability support through Terraform. The module can be found under https://github.com/canonical/haproxy-operator/tree/main/terraform/product.

Relevant links:

Breaking changes

The following backwards-incompatible changes are included in this release.

Updated library to add more attributes

The subdomain attribute has been replaced with the hostname and additional_hostnames attribute. The charm now sends an empty list as the proxied_endpoints when the requirer data is ignored.

Relevant links:

Bug fixes

  • Added missing new lines in haproxy-route j2 template and added missing unit_address in provide_haproxy_route_requirements helper method (PR).

  • Pinned the HAProxy version and prevented automatic updates (PR).

  • Disabled sending host headers in httpchk so the charm doesn’t refuse to proxy incoming requests (PR).

  • Added checks before reloading the HAProxy service and set the charm to waiting if the validation fails (PR).

  • Fixed a typo in the cookie fetch method in the load-balancing algorithm (PR).

  • Added a new dependency to fix the linting step (PR).

  • Added “s” suffix to timeout entries (PR).

  • Fixed Jinja2 handling of newlines to prevent invalid configuration generation (PR).

  • Mitigated bug in Terraform provider by setting subordinate charm units to 1 (PR).

  • Fixed an ambiguous endpoint in an integration test (PR).

Known issues

Thanks to our contributors

Thanhphan1147, dimaqq, yhaliaw, erinecon, swetha1654, javierdelapuente, alithethird, arturo-seijas