1
0
Fork 0

Merge pull request #80 from byjg/fix-fastcgi

Add protocol support and enhance FastCGI plugin configuration
This commit is contained in:
Joao Gilberto Magalhaes 2026-06-25 00:03:40 -04:00 committed by GitHub
commit d3582ce1d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 1124 additions and 403 deletions

View file

@ -34,7 +34,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v7
- name: Install uv - name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh run: curl -LsSf https://astral.sh/uv/install.sh | sh
@ -58,7 +58,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v7
- name: Install uv - name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh run: curl -LsSf https://astral.sh/uv/install.sh | sh
@ -82,7 +82,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v7
- name: Install uv - name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh run: curl -LsSf https://astral.sh/uv/install.sh | sh
@ -106,7 +106,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v7
- name: Install uv - name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh run: curl -LsSf https://astral.sh/uv/install.sh | sh
@ -138,7 +138,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v7
- name: Install uv - name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh run: curl -LsSf https://astral.sh/uv/install.sh | sh
@ -170,17 +170,17 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v7
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v4
- name: Log into registry - name: Log into registry
if: github.event_name == 'push' || github.event.inputs.push == 'true' if: github.event_name == 'push' || github.event.inputs.push == 'true'
uses: docker/login-action@v3 uses: docker/login-action@v4
with: with:
registry: ${{ secrets.DOCKER_REGISTRY }} registry: ${{ secrets.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKER_REGISTRY_USER }} username: ${{ secrets.DOCKER_REGISTRY_USER }}
@ -190,11 +190,11 @@ jobs:
# https://github.com/docker/metadata-action # https://github.com/docker/metadata-action
- name: Extract Docker metadata - name: Extract Docker metadata
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v6
with: with:
images: ${{ secrets.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }} images: ${{ secrets.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}
- uses: actions/github-script@v6 - uses: actions/github-script@v9
id: tags id: tags
with: with:
script: | script: |
@ -215,7 +215,7 @@ jobs:
run: | run: |
echo "${{ steps.tags.outputs.result }}" echo "${{ steps.tags.outputs.result }}"
- uses: actions/github-script@v6 - uses: actions/github-script@v9
id: normalized id: normalized
with: with:
script: | script: |
@ -239,7 +239,7 @@ jobs:
# Build and push Docker image with Buildx (don't push on PR) # Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v7
with: with:
context: . context: .
file: deploy/docker/Dockerfile file: deploy/docker/Dockerfile
@ -271,7 +271,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v7
- name: Install uv - name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh run: curl -LsSf https://astral.sh/uv/install.sh | sh
@ -291,12 +291,12 @@ jobs:
env: env:
DOC_GITHUB_TOKEN: '${{ secrets.DOC_TOKEN }}' DOC_GITHUB_TOKEN: '${{ secrets.DOC_TOKEN }}'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v7
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
with: with:
ref: master ref: master
- uses: actions/checkout@v4 - uses: actions/checkout@v7
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master'
- name: Get result - name: Get result

View file

@ -1,3 +1,8 @@
---
sidebar_key: docker-easy-haproxy
tags: [docker, devops]
---
# EasyHAProxy # EasyHAProxy
[![Sponsor](https://img.shields.io/badge/Sponsor-%23ea4aaa?logo=githubsponsors&logoColor=white&labelColor=0d1117)](https://github.com/sponsors/byjg) [![Sponsor](https://img.shields.io/badge/Sponsor-%23ea4aaa?logo=githubsponsors&logoColor=white&labelColor=0d1117)](https://github.com/sponsors/byjg)

View file

@ -54,7 +54,7 @@ EasyHAProxy follows [Semantic Versioning](https://semver.org/):
- **MINOR**: New features, plugin additions, backward-compatible changes - **MINOR**: New features, plugin additions, backward-compatible changes
- **PATCH**: Bug fixes, documentation updates, minor improvements - **PATCH**: Bug fixes, documentation updates, minor improvements
**Current Version:** `6.0.1` (as of Chart.yaml) **Current Version:** `6.1.0` (as of Chart.yaml)
## Automated Release (Recommended) ## Automated Release (Recommended)
@ -329,6 +329,7 @@ helm show chart byjg/easyhaproxy
| Version | Release Date | Type | Highlights | | Version | Release Date | Type | Highlights |
|---------|--------------|-------|---------------------------------------------------------------------------------------------------------------------------------------| |---------|--------------|-------|---------------------------------------------------------------------------------------------------------------------------------------|
| 6.1.0 | 2026-06-24 | Minor | FastCGI protocol support, certbot sidecar plugin, dependency updates |
| 6.0.1 | 2026-02-23 | Patch | HAProxy dashboard, real-time monitoring dashboard with live traffic charts, ACME e2e test fixes | | 6.0.1 | 2026-02-23 | Patch | HAProxy dashboard, real-time monitoring dashboard with live traffic charts, ACME e2e test fixes |
| 6.0.0 | 2026-XX-XX | Major | Python module refactoring (one-class-per-file), IngressClassName support (spec.ingressClassName + deprecated annotation fallback), modernized build system (uv/pyproject.toml), improved version management and release tooling, GitHub Actions workflow_dispatch push control | | 6.0.0 | 2026-XX-XX | Major | Python module refactoring (one-class-per-file), IngressClassName support (spec.ingressClassName + deprecated annotation fallback), modernized build system (uv/pyproject.toml), improved version management and release tooling, GitHub Actions workflow_dispatch push control |
| 5.0.0 | 2025-12-04 | Major | Plugin framework (builtin plugins: JWT, FastCGI, Cloudflare, IP whitelist, deny pages, cleanup), docs restructure, examples refreshed | | 5.0.0 | 2025-12-04 | Major | Plugin framework (builtin plugins: JWT, FastCGI, Cloudflare, IP whitelist, deny pages, cleanup), docs restructure, examples refreshed |

View file

@ -1,6 +1,6 @@
services: services:
easyhaproxy: easyhaproxy:
image: byjg/easy-haproxy:6.0.1 image: byjg/easy-haproxy:6.1.0
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- certs_certbot:/etc/easyhaproxy/certs/certbot - certs_certbot:/etc/easyhaproxy/certs/certbot

View file

@ -6,10 +6,10 @@ metadata:
name: ingress-easyhaproxy name: ingress-easyhaproxy
namespace: easyhaproxy namespace: easyhaproxy
labels: labels:
helm.sh/chart: easyhaproxy-2.0.2 helm.sh/chart: easyhaproxy-2.0.3
app.kubernetes.io/name: easyhaproxy app.kubernetes.io/name: easyhaproxy
app.kubernetes.io/instance: ingress app.kubernetes.io/instance: ingress
app.kubernetes.io/version: "6.0.1" app.kubernetes.io/version: "6.1.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
--- ---
# Source: easyhaproxy/templates/clusterrole.yaml # Source: easyhaproxy/templates/clusterrole.yaml
@ -19,10 +19,10 @@ metadata:
name: ingress-easyhaproxy name: ingress-easyhaproxy
namespace: easyhaproxy namespace: easyhaproxy
labels: labels:
helm.sh/chart: easyhaproxy-2.0.2 helm.sh/chart: easyhaproxy-2.0.3
app.kubernetes.io/name: easyhaproxy app.kubernetes.io/name: easyhaproxy
app.kubernetes.io/instance: ingress app.kubernetes.io/instance: ingress
app.kubernetes.io/version: "6.0.1" app.kubernetes.io/version: "6.1.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
rules: rules:
- apiGroups: - apiGroups:
@ -83,10 +83,10 @@ metadata:
name: ingress-easyhaproxy name: ingress-easyhaproxy
namespace: easyhaproxy namespace: easyhaproxy
labels: labels:
helm.sh/chart: easyhaproxy-2.0.2 helm.sh/chart: easyhaproxy-2.0.3
app.kubernetes.io/name: easyhaproxy app.kubernetes.io/name: easyhaproxy
app.kubernetes.io/instance: ingress app.kubernetes.io/instance: ingress
app.kubernetes.io/version: "6.0.1" app.kubernetes.io/version: "6.1.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
roleRef: roleRef:
apiGroup: rbac.authorization.k8s.io apiGroup: rbac.authorization.k8s.io
@ -105,10 +105,10 @@ metadata:
name: ingress-easyhaproxy name: ingress-easyhaproxy
namespace: easyhaproxy namespace: easyhaproxy
labels: labels:
helm.sh/chart: easyhaproxy-2.0.2 helm.sh/chart: easyhaproxy-2.0.3
app.kubernetes.io/name: easyhaproxy app.kubernetes.io/name: easyhaproxy
app.kubernetes.io/instance: ingress app.kubernetes.io/instance: ingress
app.kubernetes.io/version: "6.0.1" app.kubernetes.io/version: "6.1.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
annotations: annotations:
{} {}
@ -140,10 +140,10 @@ metadata:
name: ingress-easyhaproxy name: ingress-easyhaproxy
namespace: easyhaproxy namespace: easyhaproxy
labels: labels:
helm.sh/chart: easyhaproxy-2.0.2 helm.sh/chart: easyhaproxy-2.0.3
app.kubernetes.io/name: easyhaproxy app.kubernetes.io/name: easyhaproxy
app.kubernetes.io/instance: ingress app.kubernetes.io/instance: ingress
app.kubernetes.io/version: "6.0.1" app.kubernetes.io/version: "6.1.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
spec: spec:
replicas: 1 replicas: 1
@ -164,7 +164,7 @@ spec:
- name: easyhaproxy - name: easyhaproxy
securityContext: securityContext:
{} {}
image: "byjg/easy-haproxy:6.0.1" image: "byjg/easy-haproxy:6.1.0"
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- name: http - name: http
@ -217,10 +217,10 @@ kind: IngressClass
metadata: metadata:
name: easyhaproxy name: easyhaproxy
labels: labels:
helm.sh/chart: easyhaproxy-2.0.2 helm.sh/chart: easyhaproxy-2.0.3
app.kubernetes.io/name: easyhaproxy app.kubernetes.io/name: easyhaproxy
app.kubernetes.io/instance: ingress app.kubernetes.io/instance: ingress
app.kubernetes.io/version: "6.0.1" app.kubernetes.io/version: "6.1.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
spec: spec:
controller: byjg.com/easyhaproxy controller: byjg.com/easyhaproxy

View file

@ -6,10 +6,10 @@ metadata:
name: ingress-easyhaproxy name: ingress-easyhaproxy
namespace: easyhaproxy namespace: easyhaproxy
labels: labels:
helm.sh/chart: easyhaproxy-2.0.2 helm.sh/chart: easyhaproxy-2.0.3
app.kubernetes.io/name: easyhaproxy app.kubernetes.io/name: easyhaproxy
app.kubernetes.io/instance: ingress app.kubernetes.io/instance: ingress
app.kubernetes.io/version: "6.0.1" app.kubernetes.io/version: "6.1.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
--- ---
# Source: easyhaproxy/templates/clusterrole.yaml # Source: easyhaproxy/templates/clusterrole.yaml
@ -19,10 +19,10 @@ metadata:
name: ingress-easyhaproxy name: ingress-easyhaproxy
namespace: easyhaproxy namespace: easyhaproxy
labels: labels:
helm.sh/chart: easyhaproxy-2.0.2 helm.sh/chart: easyhaproxy-2.0.3
app.kubernetes.io/name: easyhaproxy app.kubernetes.io/name: easyhaproxy
app.kubernetes.io/instance: ingress app.kubernetes.io/instance: ingress
app.kubernetes.io/version: "6.0.1" app.kubernetes.io/version: "6.1.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
rules: rules:
- apiGroups: - apiGroups:
@ -83,10 +83,10 @@ metadata:
name: ingress-easyhaproxy name: ingress-easyhaproxy
namespace: easyhaproxy namespace: easyhaproxy
labels: labels:
helm.sh/chart: easyhaproxy-2.0.2 helm.sh/chart: easyhaproxy-2.0.3
app.kubernetes.io/name: easyhaproxy app.kubernetes.io/name: easyhaproxy
app.kubernetes.io/instance: ingress app.kubernetes.io/instance: ingress
app.kubernetes.io/version: "6.0.1" app.kubernetes.io/version: "6.1.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
roleRef: roleRef:
apiGroup: rbac.authorization.k8s.io apiGroup: rbac.authorization.k8s.io
@ -104,10 +104,10 @@ metadata:
name: ingress-easyhaproxy name: ingress-easyhaproxy
namespace: easyhaproxy namespace: easyhaproxy
labels: labels:
helm.sh/chart: easyhaproxy-2.0.2 helm.sh/chart: easyhaproxy-2.0.3
app.kubernetes.io/name: easyhaproxy app.kubernetes.io/name: easyhaproxy
app.kubernetes.io/instance: ingress app.kubernetes.io/instance: ingress
app.kubernetes.io/version: "6.0.1" app.kubernetes.io/version: "6.1.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
spec: spec:
selector: selector:
@ -136,7 +136,7 @@ spec:
- name: easyhaproxy - name: easyhaproxy
securityContext: securityContext:
{} {}
image: "byjg/easy-haproxy:6.0.1" image: "byjg/easy-haproxy:6.1.0"
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- name: http - name: http
@ -189,10 +189,10 @@ kind: IngressClass
metadata: metadata:
name: easyhaproxy name: easyhaproxy
labels: labels:
helm.sh/chart: easyhaproxy-2.0.2 helm.sh/chart: easyhaproxy-2.0.3
app.kubernetes.io/name: easyhaproxy app.kubernetes.io/name: easyhaproxy
app.kubernetes.io/instance: ingress app.kubernetes.io/instance: ingress
app.kubernetes.io/version: "6.0.1" app.kubernetes.io/version: "6.1.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
spec: spec:
controller: byjg.com/easyhaproxy controller: byjg.com/easyhaproxy

View file

@ -6,10 +6,10 @@ metadata:
name: ingress-easyhaproxy name: ingress-easyhaproxy
namespace: easyhaproxy namespace: easyhaproxy
labels: labels:
helm.sh/chart: easyhaproxy-2.0.2 helm.sh/chart: easyhaproxy-2.0.3
app.kubernetes.io/name: easyhaproxy app.kubernetes.io/name: easyhaproxy
app.kubernetes.io/instance: ingress app.kubernetes.io/instance: ingress
app.kubernetes.io/version: "6.0.1" app.kubernetes.io/version: "6.1.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
--- ---
# Source: easyhaproxy/templates/clusterrole.yaml # Source: easyhaproxy/templates/clusterrole.yaml
@ -19,10 +19,10 @@ metadata:
name: ingress-easyhaproxy name: ingress-easyhaproxy
namespace: easyhaproxy namespace: easyhaproxy
labels: labels:
helm.sh/chart: easyhaproxy-2.0.2 helm.sh/chart: easyhaproxy-2.0.3
app.kubernetes.io/name: easyhaproxy app.kubernetes.io/name: easyhaproxy
app.kubernetes.io/instance: ingress app.kubernetes.io/instance: ingress
app.kubernetes.io/version: "6.0.1" app.kubernetes.io/version: "6.1.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
rules: rules:
- apiGroups: - apiGroups:
@ -83,10 +83,10 @@ metadata:
name: ingress-easyhaproxy name: ingress-easyhaproxy
namespace: easyhaproxy namespace: easyhaproxy
labels: labels:
helm.sh/chart: easyhaproxy-2.0.2 helm.sh/chart: easyhaproxy-2.0.3
app.kubernetes.io/name: easyhaproxy app.kubernetes.io/name: easyhaproxy
app.kubernetes.io/instance: ingress app.kubernetes.io/instance: ingress
app.kubernetes.io/version: "6.0.1" app.kubernetes.io/version: "6.1.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
roleRef: roleRef:
apiGroup: rbac.authorization.k8s.io apiGroup: rbac.authorization.k8s.io
@ -105,10 +105,10 @@ metadata:
name: ingress-easyhaproxy name: ingress-easyhaproxy
namespace: easyhaproxy namespace: easyhaproxy
labels: labels:
helm.sh/chart: easyhaproxy-2.0.2 helm.sh/chart: easyhaproxy-2.0.3
app.kubernetes.io/name: easyhaproxy app.kubernetes.io/name: easyhaproxy
app.kubernetes.io/instance: ingress app.kubernetes.io/instance: ingress
app.kubernetes.io/version: "6.0.1" app.kubernetes.io/version: "6.1.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
annotations: annotations:
{} {}
@ -140,10 +140,10 @@ metadata:
name: ingress-easyhaproxy name: ingress-easyhaproxy
namespace: easyhaproxy namespace: easyhaproxy
labels: labels:
helm.sh/chart: easyhaproxy-2.0.2 helm.sh/chart: easyhaproxy-2.0.3
app.kubernetes.io/name: easyhaproxy app.kubernetes.io/name: easyhaproxy
app.kubernetes.io/instance: ingress app.kubernetes.io/instance: ingress
app.kubernetes.io/version: "6.0.1" app.kubernetes.io/version: "6.1.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
spec: spec:
replicas: 1 replicas: 1
@ -164,7 +164,7 @@ spec:
- name: easyhaproxy - name: easyhaproxy
securityContext: securityContext:
{} {}
image: "byjg/easy-haproxy:6.0.1" image: "byjg/easy-haproxy:6.1.0"
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- name: http - name: http
@ -217,10 +217,10 @@ kind: IngressClass
metadata: metadata:
name: easyhaproxy name: easyhaproxy
labels: labels:
helm.sh/chart: easyhaproxy-2.0.2 helm.sh/chart: easyhaproxy-2.0.3
app.kubernetes.io/name: easyhaproxy app.kubernetes.io/name: easyhaproxy
app.kubernetes.io/instance: ingress app.kubernetes.io/instance: ingress
app.kubernetes.io/version: "6.0.1" app.kubernetes.io/version: "6.1.0"
app.kubernetes.io/managed-by: Helm app.kubernetes.io/managed-by: Helm
spec: spec:
controller: byjg.com/easyhaproxy controller: byjg.com/easyhaproxy

View file

@ -41,7 +41,7 @@ Exposes HAProxy on NodePort `31080` (HTTP), `31443` (HTTPS), and `31936` (stats)
```bash ```bash
kubectl apply -f \ kubectl apply -f \
https://raw.githubusercontent.com/byjg/docker-easy-haproxy/6.0.1/deploy/kubernetes/easyhaproxy-nodeport.yml https://raw.githubusercontent.com/byjg/docker-easy-haproxy/6.1.0/deploy/kubernetes/easyhaproxy-nodeport.yml
``` ```
### ClusterIP (behind a LoadBalancer) ### ClusterIP (behind a LoadBalancer)
@ -50,7 +50,7 @@ Cluster-internal only. Pair with an external cloud LoadBalancer or `kubectl port
```bash ```bash
kubectl apply -f \ kubectl apply -f \
https://raw.githubusercontent.com/byjg/docker-easy-haproxy/6.0.1/deploy/kubernetes/easyhaproxy-clusterip.yml https://raw.githubusercontent.com/byjg/docker-easy-haproxy/6.1.0/deploy/kubernetes/easyhaproxy-clusterip.yml
``` ```
### DaemonSet (special cases — requires node label) ### DaemonSet (special cases — requires node label)
@ -64,7 +64,7 @@ The node label must be reapplied after any node replacement. Failing to do so wi
kubectl label nodes node-01 "easyhaproxy/node=master" kubectl label nodes node-01 "easyhaproxy/node=master"
kubectl apply -f \ kubectl apply -f \
https://raw.githubusercontent.com/byjg/docker-easy-haproxy/6.0.1/deploy/kubernetes/easyhaproxy-daemonset.yml https://raw.githubusercontent.com/byjg/docker-easy-haproxy/6.1.0/deploy/kubernetes/easyhaproxy-daemonset.yml
``` ```
If you need to configure environment variables (log levels, stats password, etc.), see the [environment variable reference](../reference/environment-variables.md). If you need to configure environment variables (log levels, stats password, etc.), see the [environment variable reference](../reference/environment-variables.md).

View file

@ -28,7 +28,7 @@ docker network create -d overlay --attachable easyhaproxy
```yaml ```yaml
services: services:
haproxy: haproxy:
image: byjg/easy-haproxy:6.0.1 image: byjg/easy-haproxy:6.1.0
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
deploy: deploy:

View file

@ -157,7 +157,7 @@ Here's a complete `docker-compose.yml` showing proper ACME configuration:
```yaml ```yaml
services: services:
easyhaproxy: easyhaproxy:
image: byjg/easy-haproxy:6.0.1 image: byjg/easy-haproxy:6.1.0
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
# REQUIRED: Persist Certbot certificates (ACME) # REQUIRED: Persist Certbot certificates (ACME)

View file

@ -83,7 +83,7 @@ docker cp single.pem easyhaproxy:/etc/easyhaproxy/certs/haproxy/example.com.pem
```yaml ```yaml
services: services:
easyhaproxy: easyhaproxy:
image: byjg/easy-haproxy:6.0.1 image: byjg/easy-haproxy:6.1.0
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- certs_haproxy:/etc/easyhaproxy/certs/haproxy - certs_haproxy:/etc/easyhaproxy/certs/haproxy

View file

@ -154,12 +154,13 @@ docker run \
When using Kubernetes, configure EasyHAProxy behavior with these annotations on your Ingress resources. Annotations apply to **all hosts** in the ingress configuration. When using Kubernetes, configure EasyHAProxy behavior with these annotations on your Ingress resources. Annotations apply to **all hosts** in the ingress configuration.
| Annotation | Description | Default | Example | | Annotation | Description | Default | Example |
|-------------------------------------|--------------------------------------------------------------------------------------|------------|-----------------------------| |-------------------------------------|------------------------------------------------------------------------------------------------|------------|----------------------------|
| kubernetes.io/ingress.class | (deprecated) Activate EasyHAProxy. Use `spec.ingressClassName` instead. | *optional* | easyhaproxy-ingress | | kubernetes.io/ingress.class | (deprecated) Activate EasyHAProxy. Use `spec.ingressClassName` instead. | *optional* | easyhaproxy-ingress |
| easyhaproxy.redirect_ssl | (optional) Boolean. Force redirect all endpoints to HTTPS. | false | true or false | | easyhaproxy.redirect_ssl | (optional) Boolean. Force redirect all endpoints to HTTPS. | false | true or false |
| easyhaproxy.certbot | (optional) Boolean. Request certbot certificates for the ingress domains. | false | true or false | | easyhaproxy.certbot | (optional) Boolean. Request certbot certificates for the ingress domains. | false | true or false |
| easyhaproxy.redirect | (optional) JSON. Key pair with a domain and its destination. | *empty* | \{"domain":"redirect_url"} | | easyhaproxy.redirect | (optional) JSON. Key pair with a domain and its destination. | *empty* | \{"domain":"redirect_url"} |
| easyhaproxy.mode | (optional) Set the HTTP mode for that connection. | http | http or tcp | | easyhaproxy.mode | (optional) Set the HTTP mode for that connection. | http | http or tcp |
| easyhaproxy.proto | (optional) Backend server protocol. Automatically set to `fcgi` when using the fastcgi plugin. | *empty* | fcgi, h2 |
| easyhaproxy.listen_port | (optional) Override the HTTP listen port created for that ingress. | 80 | 8081 | | easyhaproxy.listen_port | (optional) Override the HTTP listen port created for that ingress. | 80 | 8081 |
| easyhaproxy.plugins | (optional) Comma-separated list of plugins to enable for this ingress. | *empty* | cloudflare,deny_pages | | easyhaproxy.plugins | (optional) Comma-separated list of plugins to enable for this ingress. | *empty* | cloudflare,deny_pages |
| easyhaproxy.plugin.`{name}`.`{key}` | (optional) Plugin-specific configuration (see [Using Plugins](../guides/plugins.md)) | *varies* | See plugin docs | | easyhaproxy.plugin.`{name}`.`{key}` | (optional) Plugin-specific configuration (see [Using Plugins](../guides/plugins.md)) | *varies* | See plugin docs |

View file

@ -67,6 +67,8 @@ services:
### Kubernetes Annotations ### Kubernetes Annotations
The `proto: fcgi` backend protocol is set automatically when using this plugin — no need to add `easyhaproxy.proto` manually.
```yaml ```yaml
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
@ -75,12 +77,15 @@ metadata:
easyhaproxy.plugins: "fastcgi" easyhaproxy.plugins: "fastcgi"
easyhaproxy.plugin.fastcgi.document_root: "/var/www/html" easyhaproxy.plugin.fastcgi.document_root: "/var/www/html"
easyhaproxy.plugin.fastcgi.index_file: "index.php" easyhaproxy.plugin.fastcgi.index_file: "index.php"
easyhaproxy.plugin.fastcgi.script_filename: "/var/www/html/index.php"
spec: spec:
ingressClassName: easyhaproxy
rules: rules:
- host: phpapp.example.com - host: phpapp.example.com
http: http:
paths: paths:
- path: / - path: /
pathType: ImplementationSpecific
backend: backend:
service: service:
name: php-fpm name: php-fpm

View file

@ -15,12 +15,12 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.0.2 version: 2.0.3
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to # incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using. # follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes. # It is recommended to use it with quotes.
appVersion: "6.0.1" appVersion: "6.1.0"
icon: https://opensource.byjg.com/img/easy_haproxy_logo.png icon: https://opensource.byjg.com/img/easy_haproxy_logo.png

View file

@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project] [project]
name = "easyhaproxy" name = "easyhaproxy"
version = "6.0.1" version = "6.1.0"
description = "HAProxy label based routing with service discovery for Docker, Swarm, and Kubernetes" description = "HAProxy label based routing with service discovery for Docker, Swarm, and Kubernetes"
readme = "README.md" readme = "README.md"
license = {file = "LICENSE"} license = {file = "LICENSE"}

View file

@ -260,6 +260,11 @@ class HaproxyConfigGenerator:
# Extract all plugin configs in a single loop # Extract all plugin configs in a single loop
plugin_configs_for_host = [] plugin_configs_for_host = []
for result in domain_results: for result in domain_results:
# Allow plugins to override host-level config (e.g. proto)
if result.modified_easymapping:
for key, value in result.modified_easymapping.items():
easymapping[port]["hosts"][hostname][key] = value
# HAProxy config snippets for this domain # HAProxy config snippets for this domain
if result.haproxy_config: if result.haproxy_config:
plugin_configs_for_host.append(result.haproxy_config) plugin_configs_for_host.append(result.haproxy_config)

View file

@ -4,7 +4,7 @@ import shutil
import subprocess import subprocess
import sys import sys
import time import time
from multiprocessing import Process import multiprocessing
from typing import Final from typing import Final
import psutil import psutil
@ -31,7 +31,7 @@ class DaemonizeHAProxy:
logger_haproxy.fatal(f"Failed to start HAProxy ({action}). Exiting.") logger_haproxy.fatal(f"Failed to start HAProxy ({action}). Exiting.")
sys.exit(1) sys.exit(1)
self.thread = Process(target=self.__start, args=()) self.thread = multiprocessing.get_context('fork').Process(target=self.__start, args=())
self.thread.start() self.thread.start()
@staticmethod @staticmethod

View file

@ -148,7 +148,7 @@ class FastcgiPlugin(PluginInterface):
return PluginResult( return PluginResult(
haproxy_config=backend_config, # use-fcgi-app directive for the backend haproxy_config=backend_config, # use-fcgi-app directive for the backend
modified_easymapping=None, modified_easymapping={"proto": "fcgi"},
metadata=metadata, metadata=metadata,
global_configs=[fcgi_app_definition] # For top-level injection global_configs=[fcgi_app_definition] # For top-level injection
) )

View file

@ -269,6 +269,7 @@ class Kubernetes(ProcessorInterface):
redirect_ssl = self._check_annotation(annotations, "easyhaproxy.redirect_ssl") redirect_ssl = self._check_annotation(annotations, "easyhaproxy.redirect_ssl")
redirect = self._check_annotation(annotations, "easyhaproxy.redirect") redirect = self._check_annotation(annotations, "easyhaproxy.redirect")
mode = self._check_annotation(annotations, "easyhaproxy.mode") mode = self._check_annotation(annotations, "easyhaproxy.mode")
proto = self._check_annotation(annotations, "easyhaproxy.proto")
listen_port = self._check_annotation(annotations, "easyhaproxy.listen_port", 80) listen_port = self._check_annotation(annotations, "easyhaproxy.listen_port", 80)
plugins = self._check_annotation(annotations, "easyhaproxy.plugins") plugins = self._check_annotation(annotations, "easyhaproxy.plugins")
@ -432,6 +433,8 @@ class Kubernetes(ProcessorInterface):
rule_data[f"{definition}.redirect"] = redirect rule_data[f"{definition}.redirect"] = redirect
if mode is not None: if mode is not None:
rule_data[f"{definition}.mode"] = mode rule_data[f"{definition}.mode"] = mode
if proto is not None:
rule_data[f"{definition}.proto"] = proto
rule_data[f"{definition}.balance"] = self._check_annotation(ingress.metadata.annotations, "easyhaproxy.balance", "roundrobin") rule_data[f"{definition}.balance"] = self._check_annotation(ingress.metadata.annotations, "easyhaproxy.balance", "roundrobin")
# Add plugin configuration # Add plugin configuration

View file

@ -60,7 +60,7 @@
services: services:
haproxy: haproxy:
image: byjg/easy-haproxy:6.0.1 image: byjg/easy-haproxy:6.1.0
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
# Persist the CERTBOT to avoid re-challenge when the server restarts # Persist the CERTBOT to avoid re-challenge when the server restarts

View file

@ -77,9 +77,9 @@ services:
easyhaproxy.http.port: 80 easyhaproxy.http.port: 80
# PHP-FPM listens on port 9000 # PHP-FPM listens on port 9000
easyhaproxy.http.localport: 9000 easyhaproxy.http.localport: 9000
easyhaproxy.http.proto: fcgi
# Enable FastCGI plugin for PHP environment configuration # Enable FastCGI plugin for PHP environment configuration
# Note: proto fcgi is set automatically by the fastcgi plugin
easyhaproxy.http.plugins: fastcgi easyhaproxy.http.plugins: fastcgi
# FastCGI plugin configuration # FastCGI plugin configuration

View file

@ -59,7 +59,7 @@
services: services:
easyhaproxy: easyhaproxy:
image: byjg/easy-haproxy:6.0.1 image: byjg/easy-haproxy:6.1.0
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- certs_certbot:/etc/easyhaproxy/certs/certbot - certs_certbot:/etc/easyhaproxy/certs/certbot

View file

@ -12,7 +12,7 @@
# ```bash # ```bash
# # 1. Ensure EasyHAProxy is installed in your cluster # # 1. Ensure EasyHAProxy is installed in your cluster
# kubectl create namespace easyhaproxy # kubectl create namespace easyhaproxy
# kubectl apply -f https://raw.githubusercontent.com/byjg/docker-easy-haproxy/6.0.1/deploy/kubernetes/easyhaproxy-daemonset.yml # kubectl apply -f https://raw.githubusercontent.com/byjg/docker-easy-haproxy/6.1.0/deploy/kubernetes/easyhaproxy-daemonset.yml
# #
# # 2. Download Cloudflare IP ranges # # 2. Download Cloudflare IP ranges
# curl -s https://www.cloudflare.com/ips-v4 > cloudflare_ips.lst # curl -s https://www.cloudflare.com/ips-v4 > cloudflare_ips.lst

View file

@ -12,7 +12,7 @@
# ```bash # ```bash
# # 1. Ensure EasyHAProxy is installed in your cluster # # 1. Ensure EasyHAProxy is installed in your cluster
# kubectl create namespace easyhaproxy # kubectl create namespace easyhaproxy
# kubectl apply -f https://raw.githubusercontent.com/byjg/docker-easy-haproxy/6.0.1/deploy/kubernetes/easyhaproxy-daemonset.yml # kubectl apply -f https://raw.githubusercontent.com/byjg/docker-easy-haproxy/6.1.0/deploy/kubernetes/easyhaproxy-daemonset.yml
# #
# # 2. IMPORTANT: Edit this file (line 80) and update allowed_ips # # 2. IMPORTANT: Edit this file (line 80) and update allowed_ips
# # with your actual office/VPN IP addresses or networks # # with your actual office/VPN IP addresses or networks

View file

@ -30,7 +30,7 @@
# ```bash # ```bash
# # 1. Ensure EasyHAProxy is installed in your cluster # # 1. Ensure EasyHAProxy is installed in your cluster
# kubectl create namespace easyhaproxy # kubectl create namespace easyhaproxy
# kubectl apply -f https://raw.githubusercontent.com/byjg/docker-easy-haproxy/6.0.1/deploy/kubernetes/easyhaproxy-daemonset.yml # kubectl apply -f https://raw.githubusercontent.com/byjg/docker-easy-haproxy/6.1.0/deploy/kubernetes/easyhaproxy-daemonset.yml
# #
# # 2. Generate RSA key pair (idempotent - skips if exists) # # 2. Generate RSA key pair (idempotent - skips if exists)
# [ -f jwt_private.pem ] || openssl genrsa -out jwt_private.pem 2048 # [ -f jwt_private.pem ] || openssl genrsa -out jwt_private.pem 2048

View file

@ -15,7 +15,7 @@
# ```bash # ```bash
# # 1. Ensure EasyHAProxy is installed in your cluster # # 1. Ensure EasyHAProxy is installed in your cluster
# kubectl create namespace easyhaproxy # kubectl create namespace easyhaproxy
# kubectl apply -f https://raw.githubusercontent.com/byjg/docker-easy-haproxy/6.0.1/deploy/kubernetes/easyhaproxy-daemonset.yml # kubectl apply -f https://raw.githubusercontent.com/byjg/docker-easy-haproxy/6.1.0/deploy/kubernetes/easyhaproxy-daemonset.yml
# #
# # 2. Generate JWT keys (idempotent - skips if exists) # # 2. Generate JWT keys (idempotent - skips if exists)
# [ -f jwt_private.pem ] || openssl genrsa -out jwt_private.pem 2048 # [ -f jwt_private.pem ] || openssl genrsa -out jwt_private.pem 2048

View file

@ -12,7 +12,7 @@
# ```bash # ```bash
# # 1. Ensure EasyHAProxy is installed in your cluster # # 1. Ensure EasyHAProxy is installed in your cluster
# kubectl create namespace easyhaproxy # kubectl create namespace easyhaproxy
# kubectl apply -f https://raw.githubusercontent.com/byjg/docker-easy-haproxy/6.0.1/deploy/kubernetes/easyhaproxy-daemonset.yml # kubectl apply -f https://raw.githubusercontent.com/byjg/docker-easy-haproxy/6.1.0/deploy/kubernetes/easyhaproxy-daemonset.yml
# #
# # 2. Label the node where EasyHAProxy will run # # 2. Label the node where EasyHAProxy will run
# kubectl label nodes <node-name> "easyhaproxy/node=master" # kubectl label nodes <node-name> "easyhaproxy/node=master"

View file

@ -12,7 +12,7 @@
# ```bash # ```bash
# # 1. Ensure EasyHAProxy is installed in your cluster # # 1. Ensure EasyHAProxy is installed in your cluster
# kubectl create namespace easyhaproxy # kubectl create namespace easyhaproxy
# kubectl apply -f https://raw.githubusercontent.com/byjg/docker-easy-haproxy/6.0.1/deploy/kubernetes/easyhaproxy-daemonset.yml # kubectl apply -f https://raw.githubusercontent.com/byjg/docker-easy-haproxy/6.1.0/deploy/kubernetes/easyhaproxy-daemonset.yml
# #
# # 2. Label the node where EasyHAProxy will run # # 2. Label the node where EasyHAProxy will run
# kubectl label nodes <node-name> "easyhaproxy/node=master" # kubectl label nodes <node-name> "easyhaproxy/node=master"

1335
uv.lock generated

File diff suppressed because it is too large Load diff