Skip to content

Commit 2b7b2c8

Browse files
committed
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
1 parent 6939c59 commit 2b7b2c8

8 files changed

Lines changed: 55 additions & 26 deletions

File tree

deploy/kubernetes/easyhaproxy-clusterip.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
name: ingress-easyhaproxy
77
namespace: easyhaproxy
88
labels:
9-
helm.sh/chart: easyhaproxy-2.0.1
9+
helm.sh/chart: easyhaproxy-2.0.2
1010
app.kubernetes.io/name: easyhaproxy
1111
app.kubernetes.io/instance: ingress
1212
app.kubernetes.io/version: "6.0.1"
@@ -19,7 +19,7 @@ metadata:
1919
name: ingress-easyhaproxy
2020
namespace: easyhaproxy
2121
labels:
22-
helm.sh/chart: easyhaproxy-2.0.1
22+
helm.sh/chart: easyhaproxy-2.0.2
2323
app.kubernetes.io/name: easyhaproxy
2424
app.kubernetes.io/instance: ingress
2525
app.kubernetes.io/version: "6.0.1"
@@ -83,7 +83,7 @@ metadata:
8383
name: ingress-easyhaproxy
8484
namespace: easyhaproxy
8585
labels:
86-
helm.sh/chart: easyhaproxy-2.0.1
86+
helm.sh/chart: easyhaproxy-2.0.2
8787
app.kubernetes.io/name: easyhaproxy
8888
app.kubernetes.io/instance: ingress
8989
app.kubernetes.io/version: "6.0.1"
@@ -105,7 +105,7 @@ metadata:
105105
name: ingress-easyhaproxy
106106
namespace: easyhaproxy
107107
labels:
108-
helm.sh/chart: easyhaproxy-2.0.1
108+
helm.sh/chart: easyhaproxy-2.0.2
109109
app.kubernetes.io/name: easyhaproxy
110110
app.kubernetes.io/instance: ingress
111111
app.kubernetes.io/version: "6.0.1"
@@ -124,6 +124,9 @@ spec:
124124
- name: stats
125125
port: 1936
126126

127+
- name: dashboard
128+
port: 11936
129+
127130

128131

129132
selector:
@@ -137,7 +140,7 @@ metadata:
137140
name: ingress-easyhaproxy
138141
namespace: easyhaproxy
139142
labels:
140-
helm.sh/chart: easyhaproxy-2.0.1
143+
helm.sh/chart: easyhaproxy-2.0.2
141144
app.kubernetes.io/name: easyhaproxy
142145
app.kubernetes.io/instance: ingress
143146
app.kubernetes.io/version: "6.0.1"
@@ -173,6 +176,9 @@ spec:
173176
- name: stats
174177
containerPort: 1936
175178

179+
- name: dashboard
180+
containerPort: 11936
181+
176182
resources:
177183
{}
178184
env:
@@ -211,7 +217,7 @@ kind: IngressClass
211217
metadata:
212218
name: easyhaproxy
213219
labels:
214-
helm.sh/chart: easyhaproxy-2.0.1
220+
helm.sh/chart: easyhaproxy-2.0.2
215221
app.kubernetes.io/name: easyhaproxy
216222
app.kubernetes.io/instance: ingress
217223
app.kubernetes.io/version: "6.0.1"

deploy/kubernetes/easyhaproxy-daemonset.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
name: ingress-easyhaproxy
77
namespace: easyhaproxy
88
labels:
9-
helm.sh/chart: easyhaproxy-2.0.1
9+
helm.sh/chart: easyhaproxy-2.0.2
1010
app.kubernetes.io/name: easyhaproxy
1111
app.kubernetes.io/instance: ingress
1212
app.kubernetes.io/version: "6.0.1"
@@ -19,7 +19,7 @@ metadata:
1919
name: ingress-easyhaproxy
2020
namespace: easyhaproxy
2121
labels:
22-
helm.sh/chart: easyhaproxy-2.0.1
22+
helm.sh/chart: easyhaproxy-2.0.2
2323
app.kubernetes.io/name: easyhaproxy
2424
app.kubernetes.io/instance: ingress
2525
app.kubernetes.io/version: "6.0.1"
@@ -83,7 +83,7 @@ metadata:
8383
name: ingress-easyhaproxy
8484
namespace: easyhaproxy
8585
labels:
86-
helm.sh/chart: easyhaproxy-2.0.1
86+
helm.sh/chart: easyhaproxy-2.0.2
8787
app.kubernetes.io/name: easyhaproxy
8888
app.kubernetes.io/instance: ingress
8989
app.kubernetes.io/version: "6.0.1"
@@ -104,7 +104,7 @@ metadata:
104104
name: ingress-easyhaproxy
105105
namespace: easyhaproxy
106106
labels:
107-
helm.sh/chart: easyhaproxy-2.0.1
107+
helm.sh/chart: easyhaproxy-2.0.2
108108
app.kubernetes.io/name: easyhaproxy
109109
app.kubernetes.io/instance: ingress
110110
app.kubernetes.io/version: "6.0.1"
@@ -148,6 +148,9 @@ spec:
148148
- name: stats
149149
containerPort: 1936
150150
hostPort: 1936
151+
- name: dashboard
152+
containerPort: 11936
153+
hostPort: 11936
151154
resources:
152155
{}
153156
env:
@@ -186,7 +189,7 @@ kind: IngressClass
186189
metadata:
187190
name: easyhaproxy
188191
labels:
189-
helm.sh/chart: easyhaproxy-2.0.1
192+
helm.sh/chart: easyhaproxy-2.0.2
190193
app.kubernetes.io/name: easyhaproxy
191194
app.kubernetes.io/instance: ingress
192195
app.kubernetes.io/version: "6.0.1"

deploy/kubernetes/easyhaproxy-nodeport.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
name: ingress-easyhaproxy
77
namespace: easyhaproxy
88
labels:
9-
helm.sh/chart: easyhaproxy-2.0.1
9+
helm.sh/chart: easyhaproxy-2.0.2
1010
app.kubernetes.io/name: easyhaproxy
1111
app.kubernetes.io/instance: ingress
1212
app.kubernetes.io/version: "6.0.1"
@@ -19,7 +19,7 @@ metadata:
1919
name: ingress-easyhaproxy
2020
namespace: easyhaproxy
2121
labels:
22-
helm.sh/chart: easyhaproxy-2.0.1
22+
helm.sh/chart: easyhaproxy-2.0.2
2323
app.kubernetes.io/name: easyhaproxy
2424
app.kubernetes.io/instance: ingress
2525
app.kubernetes.io/version: "6.0.1"
@@ -83,7 +83,7 @@ metadata:
8383
name: ingress-easyhaproxy
8484
namespace: easyhaproxy
8585
labels:
86-
helm.sh/chart: easyhaproxy-2.0.1
86+
helm.sh/chart: easyhaproxy-2.0.2
8787
app.kubernetes.io/name: easyhaproxy
8888
app.kubernetes.io/instance: ingress
8989
app.kubernetes.io/version: "6.0.1"
@@ -105,7 +105,7 @@ metadata:
105105
name: ingress-easyhaproxy
106106
namespace: easyhaproxy
107107
labels:
108-
helm.sh/chart: easyhaproxy-2.0.1
108+
helm.sh/chart: easyhaproxy-2.0.2
109109
app.kubernetes.io/name: easyhaproxy
110110
app.kubernetes.io/instance: ingress
111111
app.kubernetes.io/version: "6.0.1"
@@ -124,6 +124,9 @@ spec:
124124
- name: stats
125125
port: 1936
126126
nodePort: 1936
127+
- name: dashboard
128+
port: 11936
129+
nodePort: 11936
127130

128131

129132
selector:
@@ -137,7 +140,7 @@ metadata:
137140
name: ingress-easyhaproxy
138141
namespace: easyhaproxy
139142
labels:
140-
helm.sh/chart: easyhaproxy-2.0.1
143+
helm.sh/chart: easyhaproxy-2.0.2
141144
app.kubernetes.io/name: easyhaproxy
142145
app.kubernetes.io/instance: ingress
143146
app.kubernetes.io/version: "6.0.1"
@@ -173,6 +176,9 @@ spec:
173176
- name: stats
174177
containerPort: 1936
175178

179+
- name: dashboard
180+
containerPort: 11936
181+
176182
resources:
177183
{}
178184
env:
@@ -211,7 +217,7 @@ kind: IngressClass
211217
metadata:
212218
name: easyhaproxy
213219
labels:
214-
helm.sh/chart: easyhaproxy-2.0.1
220+
helm.sh/chart: easyhaproxy-2.0.2
215221
app.kubernetes.io/name: easyhaproxy
216222
app.kubernetes.io/instance: ingress
217223
app.kubernetes.io/version: "6.0.1"

docs/reference/helm.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,21 @@ Set `service.create: true` and `service.type: NodePort` for most setups. DaemonS
3535

3636
## Port Binding
3737

38-
| Value | Description | Default |
39-
|---------------------------|------------------------------------|---------|
40-
| `binding.ports.http` | HTTP port | `80` |
41-
| `binding.ports.https` | HTTPS port | `443` |
42-
| `binding.ports.stats` | HAProxy stats port | `1936` |
43-
| `binding.additionalPorts` | List of additional ports to expose | `[]` |
38+
| Value | Description | Default |
39+
|----------------------------|--------------------------------------------------------------------|----------|
40+
| `binding.ports.http` | HTTP port | `80` |
41+
| `binding.ports.https` | HTTPS port | `443` |
42+
| `binding.ports.stats` | HAProxy stats port | `1936` |
43+
| `binding.ports.dashboard` | Monitoring dashboard port (always `stats + 10000` inside the pod) | `11936` |
44+
| `binding.additionalPorts` | List of additional ports to expose | `[]` |
4445

4546
## EasyHAProxy Settings
4647

4748
| Value | Description | Default |
4849
|------------------------------------|-----------------------------------------------------|------------|
49-
| `easyhaproxy.stats.username` | HAProxy stats dashboard username | `admin` |
50-
| `easyhaproxy.stats.password` | HAProxy stats dashboard password | `password` |
50+
| `easyhaproxy.stats.username` | HAProxy stats username | `admin` |
51+
| `easyhaproxy.stats.password` | HAProxy stats password. **Required** to enable the stats endpoint and dashboard. | `password` |
52+
| `easyhaproxy.stats.corsOrigin` | Allowed origin for stats API CORS (e.g. `http://node01:11936`). **Required** for the dashboard to load in a browser. | `""` |
5153
| `easyhaproxy.refresh` | Seconds between service discovery polls | `"10"` |
5254
| `easyhaproxy.customErrors` | Enable custom HTML error pages | `"true"` |
5355
| `easyhaproxy.sslMode` | TLS mode: `strict`, `default`, or `loose` | `loose` |

helm/easyhaproxy/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 2.0.1
18+
version: 2.0.2
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

helm/easyhaproxy/templates/deployment.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ spec:
4848
- name: stats
4949
containerPort: 1936
5050
{{ if not .Values.service.create }}hostPort: {{ .Values.binding.ports.stats }}{{ end }}
51+
- name: dashboard
52+
containerPort: 11936
53+
{{ if not .Values.service.create }}hostPort: {{ .Values.binding.ports.dashboard }}{{ end }}
5154
{{- range $port := .Values.binding.additionalPorts }}
5255
- name: extra{{ $port }}
5356
containerPort: {{ $port }}
@@ -62,6 +65,10 @@ spec:
6265
value: {{ .Values.easyhaproxy.stats.username }}
6366
- name: HAPROXY_PASSWORD
6467
value: {{ .Values.easyhaproxy.stats.password }}
68+
{{- if .Values.easyhaproxy.stats.corsOrigin }}
69+
- name: HAPROXY_STATS_CORS_ORIGIN
70+
value: {{ .Values.easyhaproxy.stats.corsOrigin | quote }}
71+
{{- end }}
6572
- name: EASYHAPROXY_REFRESH_CONF
6673
value: {{ .Values.easyhaproxy.refresh | quote }}
6774
- name: HAPROXY_CUSTOMERRORS

helm/easyhaproxy/templates/service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ spec:
2222
- name: stats
2323
port: 1936
2424
{{ if eq .Values.service.type "NodePort" }}nodePort: {{ .Values.binding.ports.stats }}{{ end }}
25+
- name: dashboard
26+
port: 11936
27+
{{ if eq .Values.service.type "NodePort" }}nodePort: {{ .Values.binding.ports.dashboard }}{{ end }}
2528
{{- range $port := .Values.binding.additionalPorts }}
2629
- name: extra{{ $port }}
2730
port: {{ $port }}

helm/easyhaproxy/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ binding:
2424
http: 80
2525
https: 443
2626
stats: 1936
27+
dashboard: 11936
2728
additionalPorts: []
2829

2930
serviceAccount:
@@ -80,6 +81,7 @@ easyhaproxy:
8081
stats:
8182
username: admin
8283
password: password
84+
corsOrigin: ""
8385
refresh: "10"
8486
customErrors: "true"
8587
sslMode: loose

0 commit comments

Comments
 (0)