1
0
Fork 0
Commit graph

50 commits

Author SHA1 Message Date
Joao Gilberto Magalhaes
491f4a8c09 Add support for CORS in HAProxy stats dashboard
- Introduced `HAPROXY_STATS_CORS_ORIGIN` environment variable for enabling CORS in HAProxy stats.
- Updated HAProxy configuration template to handle CORS preflight and response headers.
- Added tests for static configuration mode with CORS enabled.
- Updated documentation to include new CORS configuration details and examples.
2026-02-16 20:54:27 -05:00
Joao Gilberto Magalhaes
4df8666a2b Add health checks for Docker services, ACME environment readiness validation, and Certbot unit tests
- Introduced health checks to Docker Compose files for better service reliability.
- Added ACME environment readiness validation to ensure proper configuration for Certbot.
- Implemented unit tests for Certbot's `check_acme_environment_ready` method to cover edge cases.
- Improved E2E tests with startup wait adjustments and dynamic certificate issuance verification.
- Enhanced Kubernetes test cleanup with forced resource deletion for faster termination.
2026-02-16 11:47:28 -05:00
Joao Gilberto Magalhaes
045dd3817e Migrate configuration paths to /etc/easyhaproxy and improve health check support in E2E tests
- Refactored HAProxy configuration files, templates, and paths to use `/etc/easyhaproxy` instead of `/etc/haproxy`.
- Updated Dockerfile to generate DH params and placeholder certificates in the new configuration directory.
- Added health check support with timeout to `DockerComposeFixture` in E2E test utilities.
- Adjusted tests, templates, and plugins to use the new `Consts`-based configuration paths.
- Introduced pytest fixtures for environment isolation and temporary directory management.
2026-02-15 14:32:16 -05:00
Joao Gilberto Magalhaes
ece012a884 Introduce plugin initialization phase and consolidate config handling
- Added `initialize_plugins` method to `PluginManager` for requesting and processing file system resources during plugin initialization.
- Introduced `InitializationResult` and `ResourceRequest` structures for fine-grained resource management (e.g., directories, files).
- Enhanced configuration injection by separating `global_configs`, `defaults_configs`, and backend-level `haproxy_config`.
- Updated existing plugins (e.g., JWT Validator, Cloudflare) to use the initialization phase for resource setup.
- Simplified domain plugin execution by consolidating configuration logic into unified loops.
2026-02-13 16:14:05 -05:00
Joao Gilberto Magalhaes
97845b8a52 Refactor E2E tests and configuration format
- Replaced `easymapping` configuration with `containers` for better maintainability and clarity.
- Introduced `DockerComposeFixture` class in `utils.py` to manage Docker Compose lifecycle and smart build strategy.
- Enhanced YAML-to-environment variable conversion in `ContainerEnv` for dynamic configuration support.
- Updated HAProxy configurations and test fixtures to reflect the new format.
- Improved test coverage for YAML parsing, environment variable handling, and HAProxy config generation.
2026-02-13 12:01:47 -05:00
Joao Gilberto Magalhaes
90b01b1f13 Add Kubernetes integration tests for EasyHAProxy examples
- Introduced a suite of pytest-based integration tests for Kubernetes using `kind`.
- Automated local installation of dependencies (`kind`, `kubectl`, and `helm`) when missing.
- Implemented fixtures for Kubernetes resource management and TLS secrets.
- Added end-to-end tests for HTTP and HTTPS ingress functionality.
2026-02-12 01:42:43 -05:00
Joao Gilberto Magalhaes
dc28b18351 Fix lint errors 2026-01-22 22:05:49 -05:00
Joao Gilberto Magalhaes
62e5c054f4 Refactor: modernize codebase by replacing deprecated patterns, simplifying imports, and applying type hinting refinements. 2026-01-22 21:47:33 -05:00
Joao Gilberto Magalhaes
542fab1607 Add ingress status update functionality to support various deployment modes
- Introduced `ingressStatus` configuration in Helm values to enable status updates and customize deployment modes (auto, daemonset, nodeport, clusterip).
- Implemented logic in the processor to detect deployment mode, retrieve ingress addresses, and update ingress status dynamically.
- Updated Kubernetes manifests to grant required permissions for `ingresses/status` operations and pass necessary environment variables for configuration.
- Adjusted Helm templates and associated Kubernetes examples to reflect the new ingress status update capability.
2025-12-15 21:11:02 -05:00
Joao Gilberto Magalhaes
90e3df2b75 Add built-in plugin framework and initial plugins
- Introduced a plugin system enabling EasyHAProxy extensions.
- Added `CleanupPlugin` (GLOBAL): Handles temporary file cleanup.
- Added `CloudflarePlugin` (DOMAIN): Restores visitor IP from Cloudflare headers.
- Added `DenyPagesPlugin` (DOMAIN): Blocks access to specified paths.
- Documented the plugin architecture, configuration options, and built-in plugins in `docs/plugin-development.md` and `docs/plugins.md`.
2025-11-27 17:43:59 -05:00
Joao Gilberto Magalhaes
ea9e4ee7c8 Some fixes and documentation
- Introduced ACME HTTP-01 challenge documentation.
- Added Docker Compose example for HTTP-01 setup.
- Updated `get_haproxy_command` logic with improved PID validation using `psutil`.
- Enhanced logging with a new `SingleLineNonEmptyFilter`.
- Expanded tests for daemonize functionalities.
- Updated dependencies to include `psutil`.
2025-08-24 17:49:25 -04:00
Joao Gilberto Magalhaes
9d97d568ec creating constants 2024-11-18 09:13:11 -06:00
Joao Gilberto Magalhaes
6df8e39bb1 rename skip_log to setup_log 2024-11-16 10:49:46 -06:00
Joao Gilberto Magalhaes
06ea2bbd3f Log Refactor 2024-11-15 22:39:05 -06:00
Joao Gilberto Magalhaes
e88f6b6326 Added documentation for new feature + Upgrade HAPROXY to 2.8.11 + Upgrade Python 2024-11-15 10:13:24 -06:00
Dylan Vos
b7b372c6fc
#56: Small fix, missed ENV setting - broken cast 2024-11-09 17:37:15 +01:00
Dylan Vos
2026531b7f
#56: Small fix, missed ENV setting 2024-11-09 17:35:16 +01:00
Dylan Vos
8671a80b74
#56 prototyped manual-auth-hook and different preferred-challenges support 2024-11-09 14:10:01 +01:00
Joao Gilberto Magalhaes
166b75cd75 Minor Fix Pre-Merge 2023-07-03 15:02:32 -05:00
Joao M
812590d86c
Merge branch 'issue/41' into issue/43 2023-07-03 14:19:00 -05:00
Joao Gilberto Magalhaes
4bb1c7931d Added Retry Count 2023-07-02 11:19:51 -05:00
Joao Gilberto Magalhaes
ac1b84a842 Changes in the process of issue/renew certificate 2023-07-02 11:06:52 -05:00
Joao Gilberto Magalhaes
c96860c449 Changes in the process of issue/renew certificate 2023-07-02 10:56:05 -05:00
Joao Gilberto Magalhaes
382368d58d Minor changes 2023-07-02 10:05:30 -05:00
Joao Gilberto Magalhaes
9db4d763ec ACME Docs and changes in Functions.run_bash 2023-07-02 02:07:37 -05:00
Joao Gilberto Magalhaes
014f83332c Using Certbot auto-config 2023-07-02 00:15:38 -05:00
Joao Gilberto
7f377e263f Fix runtime errors 2023-07-01 19:07:45 -05:00
Joao Gilberto Magalhaes
3b2e9a43fd Fixing errors / reformating code 2023-07-01 18:26:50 -05:00
Joao Gilberto Magalhaes
078cb31eb7 Add parameter eab_kid and eab_hmac_key 2023-07-01 17:26:46 -05:00
Joao Gilberto Magalhaes
5dbe0a6d28 Renaming Letsencrypt to Certbot, since it will be more generic allowing other issuers. 2023-07-01 16:05:53 -05:00
Joao Gilberto Magalhaes
55888752c9 Using Python to validate the Certbot expiration date. 2023-07-01 15:30:00 -05:00
Joao Gilberto Magalhaes
089d4434d9 Adjustment in the HAProxy conf.d 2023-02-12 20:08:12 -06:00
Joao Gilberto
c2beff08fc Load custom config files 2023-02-11 15:34:18 -06:00
Joao Gilberto Magalhaes
cd2a3c6b9c Fix Runtime Errors 2023-02-08 21:34:39 -06:00
Joao Gilberto
f7969c2deb Issue #32 renaming letsencrypt test server env var 2022-11-10 18:43:50 -03:00
Joao Gilberto
79819aeacb issue #32 2022-11-09 18:27:22 -03:00
Joao M
85922425d4 Changes in the Static object 2022-09-02 23:00:16 +00:00
Joao M
3a3d5204a3 Refresh haproxy after letsencrypt 2022-09-02 21:22:17 +00:00
Joao M
f8046670a9 Fix documentation + Letsencrypt 2022-09-02 19:59:59 +00:00
Joao Gilberto Magalhaes
68eea939a3 Fix SSL on Kubernetes 2022-08-26 11:38:02 -05:00
Joao Gilberto Magalhaes
912be51399 Added Kubernetes TLS 2022-08-26 00:17:23 -05:00
Joao Gilberto Magalhaes
733e73ae58 Add log level and test for functions 2022-08-25 17:32:11 -05:00
Joao Gilberto Magalhaes
7d441d6386 adjusting level of debug 2022-08-25 12:30:17 -05:00
Joao Magalhaes
91a02166f1 Removing last bash 2022-08-25 02:26:02 +00:00
Joao M
bcb6251377 Fix typo 2022-08-25 02:15:49 +00:00
Joao M
2442b25440 Fix typo 2022-08-25 02:10:14 +00:00
Joao M
3259a1b66a Add python certbot 2022-08-25 01:52:13 +00:00
Joao Gilberto Magalhaes
0687ba60a2 Fixing multithread issue 2022-08-24 17:38:06 -05:00
Joao M
877a4b3383 More adjustmemts 2022-08-24 02:33:21 +00:00
Joao M
7d959f892a Refactoring to Python 2022-08-24 01:00:26 +00:00