From 2b7b2c887f3d302765c4ba1258fc0b3fb02e3faa Mon Sep 17 00:00:00 2001 From: Joao Gilberto Magalhaes Date: Sun, 22 Feb 2026 21:35:03 -0500 Subject: [PATCH] Add dashboard port and CORS origin support to Helm chart (2.0.2) - Add binding.ports.dashboard (default 11936) to values, deployment, and service templates - Add easyhaproxy.stats.corsOrigin value mapped to HAPROXY_STATS_CORS_ORIGIN env var - Bump chart version to 2.0.2 - Regenerate deploy/kubernetes manifests - Update docs/reference/helm.md with new values --- deploy/kubernetes/easyhaproxy-clusterip.yml | 18 ++++++++++++------ deploy/kubernetes/easyhaproxy-daemonset.yml | 13 ++++++++----- deploy/kubernetes/easyhaproxy-nodeport.yml | 18 ++++++++++++------ docs/reference/helm.md | 18 ++++++++++-------- helm/easyhaproxy/Chart.yaml | 2 +- helm/easyhaproxy/templates/deployment.yaml | 7 +++++++ helm/easyhaproxy/templates/service.yaml | 3 +++ helm/easyhaproxy/values.yaml | 2 ++ 8 files changed, 55 insertions(+), 26 deletions(-) diff --git a/deploy/kubernetes/easyhaproxy-clusterip.yml b/deploy/kubernetes/easyhaproxy-clusterip.yml index df48af6..ef5f125 100644 --- a/deploy/kubernetes/easyhaproxy-clusterip.yml +++ b/deploy/kubernetes/easyhaproxy-clusterip.yml @@ -6,7 +6,7 @@ metadata: name: ingress-easyhaproxy namespace: easyhaproxy labels: - helm.sh/chart: easyhaproxy-2.0.1 + helm.sh/chart: easyhaproxy-2.0.2 app.kubernetes.io/name: easyhaproxy app.kubernetes.io/instance: ingress app.kubernetes.io/version: "6.0.1" @@ -19,7 +19,7 @@ metadata: name: ingress-easyhaproxy namespace: easyhaproxy labels: - helm.sh/chart: easyhaproxy-2.0.1 + helm.sh/chart: easyhaproxy-2.0.2 app.kubernetes.io/name: easyhaproxy app.kubernetes.io/instance: ingress app.kubernetes.io/version: "6.0.1" @@ -83,7 +83,7 @@ metadata: name: ingress-easyhaproxy namespace: easyhaproxy labels: - helm.sh/chart: easyhaproxy-2.0.1 + helm.sh/chart: easyhaproxy-2.0.2 app.kubernetes.io/name: easyhaproxy app.kubernetes.io/instance: ingress app.kubernetes.io/version: "6.0.1" @@ -105,7 +105,7 @@ metadata: name: ingress-easyhaproxy namespace: easyhaproxy labels: - helm.sh/chart: easyhaproxy-2.0.1 + helm.sh/chart: easyhaproxy-2.0.2 app.kubernetes.io/name: easyhaproxy app.kubernetes.io/instance: ingress app.kubernetes.io/version: "6.0.1" @@ -124,6 +124,9 @@ spec: - name: stats port: 1936 + - name: dashboard + port: 11936 + selector: @@ -137,7 +140,7 @@ metadata: name: ingress-easyhaproxy namespace: easyhaproxy labels: - helm.sh/chart: easyhaproxy-2.0.1 + helm.sh/chart: easyhaproxy-2.0.2 app.kubernetes.io/name: easyhaproxy app.kubernetes.io/instance: ingress app.kubernetes.io/version: "6.0.1" @@ -173,6 +176,9 @@ spec: - name: stats containerPort: 1936 + - name: dashboard + containerPort: 11936 + resources: {} env: @@ -211,7 +217,7 @@ kind: IngressClass metadata: name: easyhaproxy labels: - helm.sh/chart: easyhaproxy-2.0.1 + helm.sh/chart: easyhaproxy-2.0.2 app.kubernetes.io/name: easyhaproxy app.kubernetes.io/instance: ingress app.kubernetes.io/version: "6.0.1" diff --git a/deploy/kubernetes/easyhaproxy-daemonset.yml b/deploy/kubernetes/easyhaproxy-daemonset.yml index cf5b8b2..a20588f 100644 --- a/deploy/kubernetes/easyhaproxy-daemonset.yml +++ b/deploy/kubernetes/easyhaproxy-daemonset.yml @@ -6,7 +6,7 @@ metadata: name: ingress-easyhaproxy namespace: easyhaproxy labels: - helm.sh/chart: easyhaproxy-2.0.1 + helm.sh/chart: easyhaproxy-2.0.2 app.kubernetes.io/name: easyhaproxy app.kubernetes.io/instance: ingress app.kubernetes.io/version: "6.0.1" @@ -19,7 +19,7 @@ metadata: name: ingress-easyhaproxy namespace: easyhaproxy labels: - helm.sh/chart: easyhaproxy-2.0.1 + helm.sh/chart: easyhaproxy-2.0.2 app.kubernetes.io/name: easyhaproxy app.kubernetes.io/instance: ingress app.kubernetes.io/version: "6.0.1" @@ -83,7 +83,7 @@ metadata: name: ingress-easyhaproxy namespace: easyhaproxy labels: - helm.sh/chart: easyhaproxy-2.0.1 + helm.sh/chart: easyhaproxy-2.0.2 app.kubernetes.io/name: easyhaproxy app.kubernetes.io/instance: ingress app.kubernetes.io/version: "6.0.1" @@ -104,7 +104,7 @@ metadata: name: ingress-easyhaproxy namespace: easyhaproxy labels: - helm.sh/chart: easyhaproxy-2.0.1 + helm.sh/chart: easyhaproxy-2.0.2 app.kubernetes.io/name: easyhaproxy app.kubernetes.io/instance: ingress app.kubernetes.io/version: "6.0.1" @@ -148,6 +148,9 @@ spec: - name: stats containerPort: 1936 hostPort: 1936 + - name: dashboard + containerPort: 11936 + hostPort: 11936 resources: {} env: @@ -186,7 +189,7 @@ kind: IngressClass metadata: name: easyhaproxy labels: - helm.sh/chart: easyhaproxy-2.0.1 + helm.sh/chart: easyhaproxy-2.0.2 app.kubernetes.io/name: easyhaproxy app.kubernetes.io/instance: ingress app.kubernetes.io/version: "6.0.1" diff --git a/deploy/kubernetes/easyhaproxy-nodeport.yml b/deploy/kubernetes/easyhaproxy-nodeport.yml index 1128f5e..dcb5c2b 100644 --- a/deploy/kubernetes/easyhaproxy-nodeport.yml +++ b/deploy/kubernetes/easyhaproxy-nodeport.yml @@ -6,7 +6,7 @@ metadata: name: ingress-easyhaproxy namespace: easyhaproxy labels: - helm.sh/chart: easyhaproxy-2.0.1 + helm.sh/chart: easyhaproxy-2.0.2 app.kubernetes.io/name: easyhaproxy app.kubernetes.io/instance: ingress app.kubernetes.io/version: "6.0.1" @@ -19,7 +19,7 @@ metadata: name: ingress-easyhaproxy namespace: easyhaproxy labels: - helm.sh/chart: easyhaproxy-2.0.1 + helm.sh/chart: easyhaproxy-2.0.2 app.kubernetes.io/name: easyhaproxy app.kubernetes.io/instance: ingress app.kubernetes.io/version: "6.0.1" @@ -83,7 +83,7 @@ metadata: name: ingress-easyhaproxy namespace: easyhaproxy labels: - helm.sh/chart: easyhaproxy-2.0.1 + helm.sh/chart: easyhaproxy-2.0.2 app.kubernetes.io/name: easyhaproxy app.kubernetes.io/instance: ingress app.kubernetes.io/version: "6.0.1" @@ -105,7 +105,7 @@ metadata: name: ingress-easyhaproxy namespace: easyhaproxy labels: - helm.sh/chart: easyhaproxy-2.0.1 + helm.sh/chart: easyhaproxy-2.0.2 app.kubernetes.io/name: easyhaproxy app.kubernetes.io/instance: ingress app.kubernetes.io/version: "6.0.1" @@ -124,6 +124,9 @@ spec: - name: stats port: 1936 nodePort: 1936 + - name: dashboard + port: 11936 + nodePort: 11936 selector: @@ -137,7 +140,7 @@ metadata: name: ingress-easyhaproxy namespace: easyhaproxy labels: - helm.sh/chart: easyhaproxy-2.0.1 + helm.sh/chart: easyhaproxy-2.0.2 app.kubernetes.io/name: easyhaproxy app.kubernetes.io/instance: ingress app.kubernetes.io/version: "6.0.1" @@ -173,6 +176,9 @@ spec: - name: stats containerPort: 1936 + - name: dashboard + containerPort: 11936 + resources: {} env: @@ -211,7 +217,7 @@ kind: IngressClass metadata: name: easyhaproxy labels: - helm.sh/chart: easyhaproxy-2.0.1 + helm.sh/chart: easyhaproxy-2.0.2 app.kubernetes.io/name: easyhaproxy app.kubernetes.io/instance: ingress app.kubernetes.io/version: "6.0.1" diff --git a/docs/reference/helm.md b/docs/reference/helm.md index 9e85e2b..6f57312 100644 --- a/docs/reference/helm.md +++ b/docs/reference/helm.md @@ -35,19 +35,21 @@ Set `service.create: true` and `service.type: NodePort` for most setups. DaemonS ## Port Binding -| Value | Description | Default | -|---------------------------|------------------------------------|---------| -| `binding.ports.http` | HTTP port | `80` | -| `binding.ports.https` | HTTPS port | `443` | -| `binding.ports.stats` | HAProxy stats port | `1936` | -| `binding.additionalPorts` | List of additional ports to expose | `[]` | +| Value | Description | Default | +|----------------------------|--------------------------------------------------------------------|----------| +| `binding.ports.http` | HTTP port | `80` | +| `binding.ports.https` | HTTPS port | `443` | +| `binding.ports.stats` | HAProxy stats port | `1936` | +| `binding.ports.dashboard` | Monitoring dashboard port (always `stats + 10000` inside the pod) | `11936` | +| `binding.additionalPorts` | List of additional ports to expose | `[]` | ## EasyHAProxy Settings | Value | Description | Default | |------------------------------------|-----------------------------------------------------|------------| -| `easyhaproxy.stats.username` | HAProxy stats dashboard username | `admin` | -| `easyhaproxy.stats.password` | HAProxy stats dashboard password | `password` | +| `easyhaproxy.stats.username` | HAProxy stats username | `admin` | +| `easyhaproxy.stats.password` | HAProxy stats password. **Required** to enable the stats endpoint and dashboard. | `password` | +| `easyhaproxy.stats.corsOrigin` | Allowed origin for stats API CORS (e.g. `http://node01:11936`). **Required** for the dashboard to load in a browser. | `""` | | `easyhaproxy.refresh` | Seconds between service discovery polls | `"10"` | | `easyhaproxy.customErrors` | Enable custom HTML error pages | `"true"` | | `easyhaproxy.sslMode` | TLS mode: `strict`, `default`, or `loose` | `loose` | diff --git a/helm/easyhaproxy/Chart.yaml b/helm/easyhaproxy/Chart.yaml index 50f6426..60b9721 100644 --- a/helm/easyhaproxy/Chart.yaml +++ b/helm/easyhaproxy/Chart.yaml @@ -15,7 +15,7 @@ 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.1 +version: 2.0.2 # 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 diff --git a/helm/easyhaproxy/templates/deployment.yaml b/helm/easyhaproxy/templates/deployment.yaml index bdbfadf..48ad3c7 100644 --- a/helm/easyhaproxy/templates/deployment.yaml +++ b/helm/easyhaproxy/templates/deployment.yaml @@ -48,6 +48,9 @@ spec: - name: stats containerPort: 1936 {{ if not .Values.service.create }}hostPort: {{ .Values.binding.ports.stats }}{{ end }} + - name: dashboard + containerPort: 11936 + {{ if not .Values.service.create }}hostPort: {{ .Values.binding.ports.dashboard }}{{ end }} {{- range $port := .Values.binding.additionalPorts }} - name: extra{{ $port }} containerPort: {{ $port }} @@ -62,6 +65,10 @@ spec: value: {{ .Values.easyhaproxy.stats.username }} - name: HAPROXY_PASSWORD value: {{ .Values.easyhaproxy.stats.password }} + {{- if .Values.easyhaproxy.stats.corsOrigin }} + - name: HAPROXY_STATS_CORS_ORIGIN + value: {{ .Values.easyhaproxy.stats.corsOrigin | quote }} + {{- end }} - name: EASYHAPROXY_REFRESH_CONF value: {{ .Values.easyhaproxy.refresh | quote }} - name: HAPROXY_CUSTOMERRORS diff --git a/helm/easyhaproxy/templates/service.yaml b/helm/easyhaproxy/templates/service.yaml index 81b2985..0242aa4 100644 --- a/helm/easyhaproxy/templates/service.yaml +++ b/helm/easyhaproxy/templates/service.yaml @@ -22,6 +22,9 @@ spec: - name: stats port: 1936 {{ if eq .Values.service.type "NodePort" }}nodePort: {{ .Values.binding.ports.stats }}{{ end }} + - name: dashboard + port: 11936 + {{ if eq .Values.service.type "NodePort" }}nodePort: {{ .Values.binding.ports.dashboard }}{{ end }} {{- range $port := .Values.binding.additionalPorts }} - name: extra{{ $port }} port: {{ $port }} diff --git a/helm/easyhaproxy/values.yaml b/helm/easyhaproxy/values.yaml index bf4906b..496d930 100644 --- a/helm/easyhaproxy/values.yaml +++ b/helm/easyhaproxy/values.yaml @@ -24,6 +24,7 @@ binding: http: 80 https: 443 stats: 1936 + dashboard: 11936 additionalPorts: [] serviceAccount: @@ -80,6 +81,7 @@ easyhaproxy: stats: username: admin password: password + corsOrigin: "" refresh: "10" customErrors: "true" sslMode: loose