Skip to content

feat!: complete HAProxy resource migration - #602

Open
damacus wants to merge 18 commits into
mainfrom
modernise-cookbook
Open

damacus wants to merge 18 commits into
mainfrom
modernise-cookbook

Conversation

@damacus

@damacus damacus commented Mar 14, 2026 •

Copy link
Copy Markdown
Member

Completes the HAProxy cookbook’s move to custom resources, with clearer instructions for installing, configuring and running HAProxy.

  • Adds a migration guide and setup examples.
  • Fixes installation with Lua and OpenSSL, and service startup when HAProxy is installed in a custom location.
  • Makes removing configuration safer: unrelated settings are preserved, and removing an entry that is already absent does nothing.
  • Adds support for Ubuntu 26.04, Oracle Linux 10 and openSUSE Leap 16.

Upgrading

  • Debian 12+, openSUSE Leap 16+ and Fedora 43+ are now required; older releases are no longer supported.
  • Removing a user list now removes the whole list.
  • Backend routing rules must belong to a frontend or listener.

@damacus
damacus requested a review from a team as a code owner March 14, 2026 21:21
Comment thread spec/unit/resources/install_spec.rb Outdated
Comment thread kitchen.dokken.yml Outdated
Comment thread mise.toml Outdated
@damacus
damacus force-pushed the modernise-cookbook branch 5 times, most recently from ef363ec to 6800126 Compare March 17, 2026 21:34

@mvangoor mvangoor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

bmhughes
bmhughes previously approved these changes Mar 18, 2026
Comment thread test/cookbooks/test/recipes/source_32.rb
damacus added 8 commits July 30, 2026 10:33
- Add frozen_string_literal: true to all Ruby files

- Add provides declarations to all resources

- Rename spec/unit/recipes/ to spec/unit/resources/

- Fix almalinux/10 fauxhai spec (use platform override instead of unbundled platform)

- Expand metadata.rb platform support (almalinux, rocky, oracle, fedora)

- Add default kitchen suite with test recipe and InSpec profile

- Align CI matrix with kitchen platforms and suites

- Add LIMITATIONS.md documenting known constraints
- 3.2 is the current LTS branch (EOL 2030-04-01)

- Update source_version default: 2.8.5 -> 3.2.14

- Update source_checksum to match 3.2.14 tarball

- Update stub_command version refs in specs

- Update test recipe versions and checksums
…t protected files

- Revert chef_version to ENV || current

- Fix pid_one_command from YAML arrays to strings (fixes scan error)

- Remove hardcoded CHEF_VERSION from mise.toml

- Revert metadata.rb and CHANGELOG.md to main (protected files)
Source compilation recipes need apt_update on Debian/Ubuntu to ensure

fresh apt cache in Dokken containers.

Signed-off-by: Dan Webb <dan.webb@damacus.io>
OpenSSL 3.5.5 Makefile.in requires perl-Time-Piece module.

Use bare apt_update across all source test recipes.
- Remove source-24/source-26 from integration-amazonlinux CI matrix
- Use perl-core on EL8 (individual perl-* modules don't exist)
- Add perl-Time-Piece for OpenSSL 3.5.5 on EL9+
- Add perl and zlib1g-dev for Debian/Ubuntu
- Add perl and zlib-devel for openSUSE

Tested locally: almalinux-8, almalinux-9, debian-12

Signed-off-by: Dan Webb <dan.webb@damacus.io>
@damacus
damacus force-pushed the modernise-cookbook branch from 48802e5 to 1342ab7 Compare July 30, 2026 09:35
@damacus damacus changed the title feat: modernise cookbook structure and ChefSpec feat!: complete HAProxy resource migration Sep 15, 2026
@github-actions

Copy link
Copy Markdown

Slowest examples

Top 10 slowest examples (1.94 seconds, 19.06% of total time)
Example Description Time in seconds
spec/unit/resources/mailer_spec.rb:50 haproxy_mailer create a mailer, frontend and backend and verify config is created properly is expected to render file "/etc/haproxy/haproxy.cfg" 0.30078
spec/unit/resources/install_spec.rb:99 haproxy_install compile HAProxy on AlmaLinux 9 is expected not to install package "pcre2-devel" 0.24965
spec/unit/resources/deletion_spec.rb:117 HAProxy configuration deletion deleting selected rules preserves other frontend rules is expected to render file "/etc/haproxy/haproxy.cfg" 0.24308
spec/unit/resources/deletion_spec.rb:88 HAProxy configuration deletion deleting a peer section is expected to render file "/etc/haproxy/haproxy.cfg" 0.22285
spec/unit/resources/deletion_spec.rb:51 HAProxy configuration deletion backend routing in a listen section is expected to render file "/etc/haproxy/haproxy.cfg" 0.19051
spec/unit/resources/cache_spec.rb:47 haproxy_cache create a cache, frontend and backend and verify config is created properly is expected to render file "/etc/haproxy/haproxy.cfg" 0.17226
spec/unit/resources/deletion_spec.rb:66 HAProxy configuration deletion deleting an absent use_backend is expected not to create directory "/etc/haproxy" 0.16551
spec/unit/resources/deletion_spec.rb:22 HAProxy configuration deletion deleting an absent cache section is expected not to create template "/etc/haproxy/haproxy.cfg" 0.14434
spec/unit/resources/deletion_spec.rb:22 HAProxy configuration deletion deleting an absent backend section is expected not to create template "/etc/haproxy/haproxy.cfg" 0.1362
spec/unit/resources/components_spec.rb:39 HAProxy configuration component resources is expected to render file "/etc/haproxy/haproxy.cfg" 0.12216

@damacus
damacus enabled auto-merge (squash) September 15, 2026 14:55

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants