Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ Each revision is versioned by the date of the revision.
- docs: Updated the home page to implement the new pattern for the "In this documentation" section.
- docs: Reorganized two tutorials to how-to section; expanded the upgrade guide

## 2026-04-21

- Do not render the default backend if there are no other backends in in the haproxy-route-tcp.

## 2026-04-17

- Added missing settings from haproxy-route-tcp relation template.
Expand Down
14 changes: 14 additions & 0 deletions docs/release-notes/artifacts/pr0476.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version_schema: 2
changes:
- title: Do not render the default backend if there are no other backends
author: skatsaounis
type: bugfix
description: >
Do not render the default backend if there are no other backends in the
haproxy-route-tcp relation template, to avoid rendering unused
configuration.
urls:
pr:
- https://github.com/canonical/haproxy-operator/pull/476
visibility: public
highlight: false
4 changes: 2 additions & 2 deletions haproxy-operator/templates/haproxy_route_tcp.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ backend {{ frontend.default_backend_name }}
{% endfor %}
{% endif %}

{# Render each backend for the frontend. #}
{% for backend in frontend.backends %}
{# Render each backend for the frontend. Skip rendering if there's only the default backend. #}
{% for backend in frontend.backends if frontend.backends|length > 1 %}
backend {{ backend.name }}
mode tcp
{% if backend.dst_port_translation %}
Expand Down
Loading