From ea110cfab40290872ad5ed7bd1037dac1dbebe58 Mon Sep 17 00:00:00 2001 From: Nicolas Bigler Date: Thu, 20 Nov 2025 15:34:19 +0100 Subject: [PATCH 1/2] [stable/redis-ha] Add additional ports for haproxy This commit adds a new field `haproxy.additionalPorts` that allows configuring additional ports for haproxy. This is useful when using a custom haproxy config with additional frontends that need to be exposed. Signed-off-by: Nicolas Bigler --- charts/redis-ha/Chart.yaml | 2 +- charts/redis-ha/README.md | 1 + .../redis-ha/templates/redis-haproxy-deployment.yaml | 4 ++++ charts/redis-ha/templates/redis-haproxy-service.yaml | 6 ++++++ charts/redis-ha/values.yaml | 11 ++++++++++- 5 files changed, 22 insertions(+), 2 deletions(-) diff --git a/charts/redis-ha/Chart.yaml b/charts/redis-ha/Chart.yaml index c007c8d..13a6867 100644 --- a/charts/redis-ha/Chart.yaml +++ b/charts/redis-ha/Chart.yaml @@ -5,7 +5,7 @@ keywords: - redis - keyvalue - database -version: 4.35.3 +version: 4.35.4 appVersion: 8.2.2 description: This Helm chart provides a highly available Redis implementation with a master/slave configuration and uses Sentinel sidecars for failover management icon: https://img.icons8.com/external-tal-revivo-shadow-tal-revivo/24/external-redis-an-in-memory-data-structure-project-implementing-a-distributed-logo-shadow-tal-revivo.png diff --git a/charts/redis-ha/README.md b/charts/redis-ha/README.md index 92a5e66..7861a44 100644 --- a/charts/redis-ha/README.md +++ b/charts/redis-ha/README.md @@ -243,6 +243,7 @@ The following table lists the configurable parameters of the Redis chart and the |-----|------|---------|-------------| | `haproxy.IPv6.enabled` | Enable HAProxy parameters to bind and consume IPv6 addresses. Enabled by default. | bool | `true` | | `haproxy.additionalAffinities` | Additional affinities to add to the haproxy pods. | object | `{}` | +| `haproxy.additionalPorts` | Additional ports to expose on HAProxy service and deployment. Each port should have a name, containerPort, and optionally servicePort (defaults to containerPort) | list | `[]` | | `haproxy.affinity` | Override all other affinity settings for the haproxy pods with a string. | string | `""` | | `haproxy.annotations` | HAProxy template annotations | object | `{}` | | `haproxy.checkFall` | haproxy.cfg `check fall` setting | int | `1` | diff --git a/charts/redis-ha/templates/redis-haproxy-deployment.yaml b/charts/redis-ha/templates/redis-haproxy-deployment.yaml index 944f86e..64a8bc0 100644 --- a/charts/redis-ha/templates/redis-haproxy-deployment.yaml +++ b/charts/redis-ha/templates/redis-haproxy-deployment.yaml @@ -180,6 +180,10 @@ spec: - name: metrics-port containerPort: {{ default "9101" .Values.haproxy.metrics.port }} {{- end }} + {{- range .Values.haproxy.additionalPorts }} + - name: {{ .name }} + containerPort: {{ .containerPort }} + {{- end }} resources: {{ toYaml .Values.haproxy.resources | indent 10 }} volumeMounts: diff --git a/charts/redis-ha/templates/redis-haproxy-service.yaml b/charts/redis-ha/templates/redis-haproxy-service.yaml index cb76cec..a54e253 100644 --- a/charts/redis-ha/templates/redis-haproxy-service.yaml +++ b/charts/redis-ha/templates/redis-haproxy-service.yaml @@ -53,6 +53,12 @@ spec: port: {{ .Values.haproxy.metrics.port }} protocol: TCP targetPort: metrics-port +{{- end }} +{{- range .Values.haproxy.additionalPorts }} + - name: {{ .name }} + port: {{ .servicePort | default .containerPort }} + protocol: TCP + targetPort: {{ .name }} {{- end }} selector: release: {{ .Release.Name }} diff --git a/charts/redis-ha/values.yaml b/charts/redis-ha/values.yaml index 4edd058..72acc23 100644 --- a/charts/redis-ha/values.yaml +++ b/charts/redis-ha/values.yaml @@ -109,13 +109,22 @@ haproxy: keyName: # -- Path to mount the secret that contains the certificates. haproxy certMountPath: /tmp/ - # -- Enable read-only redis-slaves readOnly: # -- Enable if you want a dedicated port in haproxy for redis-slaves enabled: false # -- Port for the read-only redis-slaves port: 6380 + # -- Additional ports to expose on HAProxy service and deployment + # Each port should have a name, containerPort, and optionally servicePort (defaults to containerPort) + additionalPorts: [] + # Example: + # additionalPorts: + # - name: custom-port + # containerPort: 8080 + # servicePort: 8080 + # - name: another-port + # containerPort: 9090 # -- Number of HAProxy instances replicas: 3 # -- Deployment strategy for the haproxy deployment From 6c59a1071232de3ebfaf40231dd15be8e471f8e3 Mon Sep 17 00:00:00 2001 From: Aaron Layfield Date: Mon, 8 Dec 2025 09:50:24 +0900 Subject: [PATCH 2/2] Bump Chart Signed-off-by: Aaron Layfield --- charts/redis-ha/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/redis-ha/Chart.yaml b/charts/redis-ha/Chart.yaml index 13a6867..c646d30 100644 --- a/charts/redis-ha/Chart.yaml +++ b/charts/redis-ha/Chart.yaml @@ -5,7 +5,7 @@ keywords: - redis - keyvalue - database -version: 4.35.4 +version: 4.35.5 appVersion: 8.2.2 description: This Helm chart provides a highly available Redis implementation with a master/slave configuration and uses Sentinel sidecars for failover management icon: https://img.icons8.com/external-tal-revivo-shadow-tal-revivo/24/external-redis-an-in-memory-data-structure-project-implementing-a-distributed-logo-shadow-tal-revivo.png