Merge pull request #80 from byjg/fix-fastcgi
Add protocol support and enhance FastCGI plugin configuration
This commit is contained in:
commit
d3582ce1d0
29 changed files with 1124 additions and 403 deletions
32
.github/workflows/build.yml
vendored
32
.github/workflows/build.yml
vendored
|
|
@ -34,7 +34,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Install uv
|
||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
|
|
@ -58,7 +58,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Install uv
|
||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
|
|
@ -82,7 +82,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Install uv
|
||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
|
|
@ -106,7 +106,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Install uv
|
||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
|
|
@ -138,7 +138,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Install uv
|
||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
|
|
@ -170,17 +170,17 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
uses: docker/setup-qemu-action@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
- name: Log into registry
|
||||
if: github.event_name == 'push' || github.event.inputs.push == 'true'
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: ${{ secrets.DOCKER_REGISTRY }}
|
||||
username: ${{ secrets.DOCKER_REGISTRY_USER }}
|
||||
|
|
@ -190,11 +190,11 @@ jobs:
|
|||
# https://github.com/docker/metadata-action
|
||||
- name: Extract Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
uses: docker/metadata-action@v6
|
||||
with:
|
||||
images: ${{ secrets.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
- uses: actions/github-script@v6
|
||||
- uses: actions/github-script@v9
|
||||
id: tags
|
||||
with:
|
||||
script: |
|
||||
|
|
@ -215,7 +215,7 @@ jobs:
|
|||
run: |
|
||||
echo "${{ steps.tags.outputs.result }}"
|
||||
|
||||
- uses: actions/github-script@v6
|
||||
- uses: actions/github-script@v9
|
||||
id: normalized
|
||||
with:
|
||||
script: |
|
||||
|
|
@ -239,7 +239,7 @@ jobs:
|
|||
# Build and push Docker image with Buildx (don't push on PR)
|
||||
# https://github.com/docker/build-push-action
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
context: .
|
||||
file: deploy/docker/Dockerfile
|
||||
|
|
@ -271,7 +271,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Install uv
|
||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
|
|
@ -291,12 +291,12 @@ jobs:
|
|||
env:
|
||||
DOC_GITHUB_TOKEN: '${{ secrets.DOC_TOKEN }}'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v7
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
ref: master
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v7
|
||||
if: github.ref == 'refs/heads/master'
|
||||
|
||||
- name: Get result
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
sidebar_key: docker-easy-haproxy
|
||||
tags: [docker, devops]
|
||||
---
|
||||
|
||||
# EasyHAProxy
|
||||
|
||||
[](https://github.com/sponsors/byjg)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ EasyHAProxy follows [Semantic Versioning](https://semver.org/):
|
|||
- **MINOR**: New features, plugin additions, backward-compatible changes
|
||||
- **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)
|
||||
|
||||
|
|
@ -329,6 +329,7 @@ helm show chart byjg/easyhaproxy
|
|||
|
||||
| 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.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 |
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
services:
|
||||
easyhaproxy:
|
||||
image: byjg/easy-haproxy:6.0.1
|
||||
image: byjg/easy-haproxy:6.1.0
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- certs_certbot:/etc/easyhaproxy/certs/certbot
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ metadata:
|
|||
name: ingress-easyhaproxy
|
||||
namespace: easyhaproxy
|
||||
labels:
|
||||
helm.sh/chart: easyhaproxy-2.0.2
|
||||
helm.sh/chart: easyhaproxy-2.0.3
|
||||
app.kubernetes.io/name: easyhaproxy
|
||||
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
|
||||
---
|
||||
# Source: easyhaproxy/templates/clusterrole.yaml
|
||||
|
|
@ -19,10 +19,10 @@ metadata:
|
|||
name: ingress-easyhaproxy
|
||||
namespace: easyhaproxy
|
||||
labels:
|
||||
helm.sh/chart: easyhaproxy-2.0.2
|
||||
helm.sh/chart: easyhaproxy-2.0.3
|
||||
app.kubernetes.io/name: easyhaproxy
|
||||
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
|
||||
rules:
|
||||
- apiGroups:
|
||||
|
|
@ -83,10 +83,10 @@ metadata:
|
|||
name: ingress-easyhaproxy
|
||||
namespace: easyhaproxy
|
||||
labels:
|
||||
helm.sh/chart: easyhaproxy-2.0.2
|
||||
helm.sh/chart: easyhaproxy-2.0.3
|
||||
app.kubernetes.io/name: easyhaproxy
|
||||
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
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
|
@ -105,10 +105,10 @@ metadata:
|
|||
name: ingress-easyhaproxy
|
||||
namespace: easyhaproxy
|
||||
labels:
|
||||
helm.sh/chart: easyhaproxy-2.0.2
|
||||
helm.sh/chart: easyhaproxy-2.0.3
|
||||
app.kubernetes.io/name: easyhaproxy
|
||||
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
|
||||
annotations:
|
||||
{}
|
||||
|
|
@ -140,10 +140,10 @@ metadata:
|
|||
name: ingress-easyhaproxy
|
||||
namespace: easyhaproxy
|
||||
labels:
|
||||
helm.sh/chart: easyhaproxy-2.0.2
|
||||
helm.sh/chart: easyhaproxy-2.0.3
|
||||
app.kubernetes.io/name: easyhaproxy
|
||||
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
|
||||
spec:
|
||||
replicas: 1
|
||||
|
|
@ -164,7 +164,7 @@ spec:
|
|||
- name: easyhaproxy
|
||||
securityContext:
|
||||
{}
|
||||
image: "byjg/easy-haproxy:6.0.1"
|
||||
image: "byjg/easy-haproxy:6.1.0"
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- name: http
|
||||
|
|
@ -217,10 +217,10 @@ kind: IngressClass
|
|||
metadata:
|
||||
name: easyhaproxy
|
||||
labels:
|
||||
helm.sh/chart: easyhaproxy-2.0.2
|
||||
helm.sh/chart: easyhaproxy-2.0.3
|
||||
app.kubernetes.io/name: easyhaproxy
|
||||
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
|
||||
spec:
|
||||
controller: byjg.com/easyhaproxy
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ metadata:
|
|||
name: ingress-easyhaproxy
|
||||
namespace: easyhaproxy
|
||||
labels:
|
||||
helm.sh/chart: easyhaproxy-2.0.2
|
||||
helm.sh/chart: easyhaproxy-2.0.3
|
||||
app.kubernetes.io/name: easyhaproxy
|
||||
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
|
||||
---
|
||||
# Source: easyhaproxy/templates/clusterrole.yaml
|
||||
|
|
@ -19,10 +19,10 @@ metadata:
|
|||
name: ingress-easyhaproxy
|
||||
namespace: easyhaproxy
|
||||
labels:
|
||||
helm.sh/chart: easyhaproxy-2.0.2
|
||||
helm.sh/chart: easyhaproxy-2.0.3
|
||||
app.kubernetes.io/name: easyhaproxy
|
||||
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
|
||||
rules:
|
||||
- apiGroups:
|
||||
|
|
@ -83,10 +83,10 @@ metadata:
|
|||
name: ingress-easyhaproxy
|
||||
namespace: easyhaproxy
|
||||
labels:
|
||||
helm.sh/chart: easyhaproxy-2.0.2
|
||||
helm.sh/chart: easyhaproxy-2.0.3
|
||||
app.kubernetes.io/name: easyhaproxy
|
||||
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
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
|
@ -104,10 +104,10 @@ metadata:
|
|||
name: ingress-easyhaproxy
|
||||
namespace: easyhaproxy
|
||||
labels:
|
||||
helm.sh/chart: easyhaproxy-2.0.2
|
||||
helm.sh/chart: easyhaproxy-2.0.3
|
||||
app.kubernetes.io/name: easyhaproxy
|
||||
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
|
||||
spec:
|
||||
selector:
|
||||
|
|
@ -136,7 +136,7 @@ spec:
|
|||
- name: easyhaproxy
|
||||
securityContext:
|
||||
{}
|
||||
image: "byjg/easy-haproxy:6.0.1"
|
||||
image: "byjg/easy-haproxy:6.1.0"
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- name: http
|
||||
|
|
@ -189,10 +189,10 @@ kind: IngressClass
|
|||
metadata:
|
||||
name: easyhaproxy
|
||||
labels:
|
||||
helm.sh/chart: easyhaproxy-2.0.2
|
||||
helm.sh/chart: easyhaproxy-2.0.3
|
||||
app.kubernetes.io/name: easyhaproxy
|
||||
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
|
||||
spec:
|
||||
controller: byjg.com/easyhaproxy
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ metadata:
|
|||
name: ingress-easyhaproxy
|
||||
namespace: easyhaproxy
|
||||
labels:
|
||||
helm.sh/chart: easyhaproxy-2.0.2
|
||||
helm.sh/chart: easyhaproxy-2.0.3
|
||||
app.kubernetes.io/name: easyhaproxy
|
||||
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
|
||||
---
|
||||
# Source: easyhaproxy/templates/clusterrole.yaml
|
||||
|
|
@ -19,10 +19,10 @@ metadata:
|
|||
name: ingress-easyhaproxy
|
||||
namespace: easyhaproxy
|
||||
labels:
|
||||
helm.sh/chart: easyhaproxy-2.0.2
|
||||
helm.sh/chart: easyhaproxy-2.0.3
|
||||
app.kubernetes.io/name: easyhaproxy
|
||||
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
|
||||
rules:
|
||||
- apiGroups:
|
||||
|
|
@ -83,10 +83,10 @@ metadata:
|
|||
name: ingress-easyhaproxy
|
||||
namespace: easyhaproxy
|
||||
labels:
|
||||
helm.sh/chart: easyhaproxy-2.0.2
|
||||
helm.sh/chart: easyhaproxy-2.0.3
|
||||
app.kubernetes.io/name: easyhaproxy
|
||||
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
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
|
@ -105,10 +105,10 @@ metadata:
|
|||
name: ingress-easyhaproxy
|
||||
namespace: easyhaproxy
|
||||
labels:
|
||||
helm.sh/chart: easyhaproxy-2.0.2
|
||||
helm.sh/chart: easyhaproxy-2.0.3
|
||||
app.kubernetes.io/name: easyhaproxy
|
||||
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
|
||||
annotations:
|
||||
{}
|
||||
|
|
@ -140,10 +140,10 @@ metadata:
|
|||
name: ingress-easyhaproxy
|
||||
namespace: easyhaproxy
|
||||
labels:
|
||||
helm.sh/chart: easyhaproxy-2.0.2
|
||||
helm.sh/chart: easyhaproxy-2.0.3
|
||||
app.kubernetes.io/name: easyhaproxy
|
||||
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
|
||||
spec:
|
||||
replicas: 1
|
||||
|
|
@ -164,7 +164,7 @@ spec:
|
|||
- name: easyhaproxy
|
||||
securityContext:
|
||||
{}
|
||||
image: "byjg/easy-haproxy:6.0.1"
|
||||
image: "byjg/easy-haproxy:6.1.0"
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- name: http
|
||||
|
|
@ -217,10 +217,10 @@ kind: IngressClass
|
|||
metadata:
|
||||
name: easyhaproxy
|
||||
labels:
|
||||
helm.sh/chart: easyhaproxy-2.0.2
|
||||
helm.sh/chart: easyhaproxy-2.0.3
|
||||
app.kubernetes.io/name: easyhaproxy
|
||||
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
|
||||
spec:
|
||||
controller: byjg.com/easyhaproxy
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ Exposes HAProxy on NodePort `31080` (HTTP), `31443` (HTTPS), and `31936` (stats)
|
|||
|
||||
```bash
|
||||
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)
|
||||
|
|
@ -50,7 +50,7 @@ Cluster-internal only. Pair with an external cloud LoadBalancer or `kubectl port
|
|||
|
||||
```bash
|
||||
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)
|
||||
|
|
@ -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 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).
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ docker network create -d overlay --attachable easyhaproxy
|
|||
```yaml
|
||||
services:
|
||||
haproxy:
|
||||
image: byjg/easy-haproxy:6.0.1
|
||||
image: byjg/easy-haproxy:6.1.0
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
deploy:
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ Here's a complete `docker-compose.yml` showing proper ACME configuration:
|
|||
```yaml
|
||||
services:
|
||||
easyhaproxy:
|
||||
image: byjg/easy-haproxy:6.0.1
|
||||
image: byjg/easy-haproxy:6.1.0
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
# REQUIRED: Persist Certbot certificates (ACME)
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ docker cp single.pem easyhaproxy:/etc/easyhaproxy/certs/haproxy/example.com.pem
|
|||
```yaml
|
||||
services:
|
||||
easyhaproxy:
|
||||
image: byjg/easy-haproxy:6.0.1
|
||||
image: byjg/easy-haproxy:6.1.0
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- certs_haproxy:/etc/easyhaproxy/certs/haproxy
|
||||
|
|
|
|||
|
|
@ -153,16 +153,17 @@ docker run \
|
|||
|
||||
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 |
|
||||
|-------------------------------------|--------------------------------------------------------------------------------------|------------|-----------------------------|
|
||||
| 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.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.mode | (optional) Set the HTTP mode for that connection. | http | http or tcp |
|
||||
| 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.plugin.`{name}`.`{key}` | (optional) Plugin-specific configuration (see [Using Plugins](../guides/plugins.md)) | *varies* | See plugin docs |
|
||||
| Annotation | Description | Default | Example |
|
||||
|-------------------------------------|------------------------------------------------------------------------------------------------|------------|----------------------------|
|
||||
| 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.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.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.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 |
|
||||
|
||||
For annotation usage examples, see the [Kubernetes getting started guide](../getting-started/kubernetes.md).
|
||||
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@ services:
|
|||
|
||||
### Kubernetes Annotations
|
||||
|
||||
The `proto: fcgi` backend protocol is set automatically when using this plugin — no need to add `easyhaproxy.proto` manually.
|
||||
|
||||
```yaml
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
|
|
@ -75,12 +77,15 @@ metadata:
|
|||
easyhaproxy.plugins: "fastcgi"
|
||||
easyhaproxy.plugin.fastcgi.document_root: "/var/www/html"
|
||||
easyhaproxy.plugin.fastcgi.index_file: "index.php"
|
||||
easyhaproxy.plugin.fastcgi.script_filename: "/var/www/html/index.php"
|
||||
spec:
|
||||
ingressClassName: easyhaproxy
|
||||
rules:
|
||||
- host: phpapp.example.com
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
service:
|
||||
name: php-fpm
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@ type: application
|
|||
# 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.
|
||||
# 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
|
||||
# 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.
|
||||
# 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
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||
|
||||
[project]
|
||||
name = "easyhaproxy"
|
||||
version = "6.0.1"
|
||||
version = "6.1.0"
|
||||
description = "HAProxy label based routing with service discovery for Docker, Swarm, and Kubernetes"
|
||||
readme = "README.md"
|
||||
license = {file = "LICENSE"}
|
||||
|
|
|
|||
|
|
@ -260,6 +260,11 @@ class HaproxyConfigGenerator:
|
|||
# Extract all plugin configs in a single loop
|
||||
plugin_configs_for_host = []
|
||||
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
|
||||
if result.haproxy_config:
|
||||
plugin_configs_for_host.append(result.haproxy_config)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import shutil
|
|||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
from multiprocessing import Process
|
||||
import multiprocessing
|
||||
from typing import Final
|
||||
|
||||
import psutil
|
||||
|
|
@ -31,7 +31,7 @@ class DaemonizeHAProxy:
|
|||
logger_haproxy.fatal(f"Failed to start HAProxy ({action}). Exiting.")
|
||||
sys.exit(1)
|
||||
|
||||
self.thread = Process(target=self.__start, args=())
|
||||
self.thread = multiprocessing.get_context('fork').Process(target=self.__start, args=())
|
||||
self.thread.start()
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ class FastcgiPlugin(PluginInterface):
|
|||
|
||||
return PluginResult(
|
||||
haproxy_config=backend_config, # use-fcgi-app directive for the backend
|
||||
modified_easymapping=None,
|
||||
modified_easymapping={"proto": "fcgi"},
|
||||
metadata=metadata,
|
||||
global_configs=[fcgi_app_definition] # For top-level injection
|
||||
)
|
||||
|
|
|
|||
|
|
@ -269,6 +269,7 @@ class Kubernetes(ProcessorInterface):
|
|||
redirect_ssl = self._check_annotation(annotations, "easyhaproxy.redirect_ssl")
|
||||
redirect = self._check_annotation(annotations, "easyhaproxy.redirect")
|
||||
mode = self._check_annotation(annotations, "easyhaproxy.mode")
|
||||
proto = self._check_annotation(annotations, "easyhaproxy.proto")
|
||||
listen_port = self._check_annotation(annotations, "easyhaproxy.listen_port", 80)
|
||||
plugins = self._check_annotation(annotations, "easyhaproxy.plugins")
|
||||
|
||||
|
|
@ -432,6 +433,8 @@ class Kubernetes(ProcessorInterface):
|
|||
rule_data[f"{definition}.redirect"] = redirect
|
||||
if mode is not None:
|
||||
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")
|
||||
|
||||
# Add plugin configuration
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
|
||||
services:
|
||||
haproxy:
|
||||
image: byjg/easy-haproxy:6.0.1
|
||||
image: byjg/easy-haproxy:6.1.0
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
# Persist the CERTBOT to avoid re-challenge when the server restarts
|
||||
|
|
|
|||
|
|
@ -77,9 +77,9 @@ services:
|
|||
easyhaproxy.http.port: 80
|
||||
# PHP-FPM listens on port 9000
|
||||
easyhaproxy.http.localport: 9000
|
||||
easyhaproxy.http.proto: fcgi
|
||||
|
||||
# Enable FastCGI plugin for PHP environment configuration
|
||||
# Note: proto fcgi is set automatically by the fastcgi plugin
|
||||
easyhaproxy.http.plugins: fastcgi
|
||||
|
||||
# FastCGI plugin configuration
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
|
||||
services:
|
||||
easyhaproxy:
|
||||
image: byjg/easy-haproxy:6.0.1
|
||||
image: byjg/easy-haproxy:6.1.0
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- certs_certbot:/etc/easyhaproxy/certs/certbot
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
# ```bash
|
||||
# # 1. Ensure EasyHAProxy is installed in your cluster
|
||||
# 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
|
||||
# curl -s https://www.cloudflare.com/ips-v4 > cloudflare_ips.lst
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
# ```bash
|
||||
# # 1. Ensure EasyHAProxy is installed in your cluster
|
||||
# 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
|
||||
# # with your actual office/VPN IP addresses or networks
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
# ```bash
|
||||
# # 1. Ensure EasyHAProxy is installed in your cluster
|
||||
# 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)
|
||||
# [ -f jwt_private.pem ] || openssl genrsa -out jwt_private.pem 2048
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
# ```bash
|
||||
# # 1. Ensure EasyHAProxy is installed in your cluster
|
||||
# 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)
|
||||
# [ -f jwt_private.pem ] || openssl genrsa -out jwt_private.pem 2048
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
# ```bash
|
||||
# # 1. Ensure EasyHAProxy is installed in your cluster
|
||||
# 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
|
||||
# kubectl label nodes <node-name> "easyhaproxy/node=master"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
# ```bash
|
||||
# # 1. Ensure EasyHAProxy is installed in your cluster
|
||||
# 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
|
||||
# kubectl label nodes <node-name> "easyhaproxy/node=master"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue