Add protocol support and improve FastCGI plugin handling
- Introduced `easyhaproxy.proto` annotation for backend protocol configuration. - Automatically set FastCGI protocol (`proto: fcgi`) when using the FastCGI plugin. - Updated Kubernetes processor to handle `proto` annotations. - Enhanced EasyMapping to allow plugin overrides for host-level configs. - Updated documentation to reflect new `proto` behavior and FastCGI improvements. - Improved multiprocessing configuration with better context handling in `haproxy.py`.
This commit is contained in:
parent
2b7b2c887f
commit
e4b62a3925
8 changed files with 33 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue