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 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 64cd640..06180a7 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