Skip to content

[Backport release-1.6] fix(tcp-balancer): rename backends and pin HAProxy so the chart starts on 3.3+ - #4516

Merged
myasnikovdaniil merged 3 commits into
cozystack:release-1.6from
yankawai:backport/tcp-balancer-release-1.6-20260926
Oct 16, 2026
Merged

myasnikovdaniil merged 3 commits into
cozystack:release-1.6from
yankawai:backport/tcp-balancer-release-1.6-20260926

Conversation

@yankawai

@yankawai europrinter (yankawai) commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

Backports #4366 to release-1.6. All three original commits applied without conflicts and retain their cherry-pick references.

HAProxy is pinned to 3.4.4 and backend names no longer collide with frontend names. An empty whitelist leaves Kubernetes and Talos frontends unfiltered. Enabling whitelistHTTP without a whitelist fails rendering.

Validation passed with 9 Helm tests, five rendered configurations checked by HAProxy 3.4.4, and package generation without changes. The old chart reproduces the name collision. Removing only the HTTP reject rule makes the regression test fail.

Downstream repositories

Release note

fix(tcp-balancer): backport HAProxy 3.4.4, distinct backend names and whitelist validation to 1.6.

@github-actions github-actions Bot added area/networking Issues or PRs related to networking (ingress, gateway, vpn, metallb, kube-ovn) area/release Issues or PRs related to release tooling (changelog, backport, release pipeline) kind/bug Categorizes issue or PR as related to a bug size/L This PR changes 100-499 lines, ignoring generated files labels Sep 26, 2026
@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: cozystack/cozystack/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fec46225-41d9-4e2f-9d28-e18b29f0fab4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…s on 3.3+

haproxy:latest now resolves to 3.3 and newer, where a backend named like
a frontend is a fatal config error, so every tcp-balancer pod fails at
config parse. Backends get a _backend suffix and the image follows the
chart appVersion on the 3.4 LTS line instead of a floating tag.

The whitelist rules render inside one guard. On the kubernetes and talos
frontends an empty whitelist means no filtering; whitelistHTTP with an
empty whitelist fails the render, because a security opt-in that quietly
became a no-op would not be noticed the way a crash is.

The unittest suite pins the rendered config for the default, whitelist
and failure cases and the image pin, so a template refactor cannot bring
the collision or the floating tag back.

Fixes cozystack#1966

Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
(cherry picked from commit 12cc48d)
The accept and reject assertions matched anywhere in haproxy.cfg, so a
frontend that lost its reject rule stayed green as long as another
frontend still carried one. Without reject a non-matching connection
falls through to HAProxy's default accept, so that frontend is open to
everyone. Each assertion now anchors the acl, accept and reject lines to
the frontend they belong to.

Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
(cherry picked from commit 6855bfb)
The render now fails when whitelistHTTP is set with an empty whitelist,
so the values description tells users that before they hit the error.

Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
(cherry picked from commit eee0596)
@yankawai
europrinter (yankawai) force-pushed the backport/tcp-balancer-release-1.6-20260926 branch from e467d86 to 948327d Compare October 4, 2026 08:40
@myasnikovdaniil
myasnikovdaniil merged commit 5a7531a into cozystack:release-1.6 Oct 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/networking Issues or PRs related to networking (ingress, gateway, vpn, metallb, kube-ovn) area/release Issues or PRs related to release tooling (changelog, backport, release pipeline) kind/bug Categorizes issue or PR as related to a bug size/L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants