From 53402e05db0054e8923fc1636fc09b85999b95b2 Mon Sep 17 00:00:00 2001 From: Martin Fleurke Date: Mon, 10 Jul 2023 21:53:43 +0200 Subject: [PATCH] Add support for HAProxy service externalIPs - fix haproxy.image.serviceAccountName to haproxy.serviceAccountName in README.md - add missing haproxy.service.loadBalancerIP entry - add new haproxy.service.externalIPs Signed-off-by: Martin Fleurke --- charts/redis-ha/Chart.yaml | 2 +- charts/redis-ha/README.md | 4 +++- charts/redis-ha/templates/redis-haproxy-service.yaml | 6 ++++++ charts/redis-ha/values.yaml | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/charts/redis-ha/Chart.yaml b/charts/redis-ha/Chart.yaml index a04c9aa..365094b 100644 --- a/charts/redis-ha/Chart.yaml +++ b/charts/redis-ha/Chart.yaml @@ -5,7 +5,7 @@ keywords: - redis - keyvalue - database -version: 4.23.0 +version: 4.24.0 appVersion: 7.0.9 description: This Helm chart provides a highly available Redis implementation with a master/slave configuration and uses Sentinel sidecars for failover management icon: https://upload.wikimedia.org/wikipedia/en/thumb/6/6b/Redis_Logo.svg/1200px-Redis_Logo.svg.png diff --git a/charts/redis-ha/README.md b/charts/redis-ha/README.md index 4d26352..cc46534 100644 --- a/charts/redis-ha/README.md +++ b/charts/redis-ha/README.md @@ -176,12 +176,14 @@ The following table lists the configurable parameters of the Redis chart and the | `haproxy.resources` | HAProxy resources | `{}` | | `haproxy.emptyDir` | Configuration of `emptyDir` | `{}` | | `haproxy.labels` | Labels for the HAProxy pod | `{}` | +| `haproxy.serviceAccountName`| HAProxy serviceAccountName | `default` | `haproxy.service.type` | HAProxy service type "ClusterIP", "LoadBalancer" or "NodePort" | `ClusterIP` | | `haproxy.service.nodePort` | HAProxy service nodePort value (haproxy.service.type must be NodePort) | not set | -| `haproxy.image.serviceAccountName`| HAProxy serviceAccountName | `default` | `haproxy.service.externalTrafficPolicy`| HAProxy service externalTrafficPolicy value (haproxy.service.type must be LoadBalancer) | not set | | `haproxy.service.annotations` | HAProxy service annotations | `{}` | | `haproxy.service.labels` | HAProxy service labels | `{}` | +| `haproxy.service.loadBalancerIP` | HAProxy service loadbalancer IP | not set | +| `haproxy.service.externalIPs` | HAProxy external IPs | `{}` | | `haproxy.stickyBalancing` | HAProxy sticky load balancing to Redis nodes. Helps with connections shutdown. | `false` | | `haproxy.hapreadport.enable` | Enable a read only port for redis slaves | `false` | | `haproxy.hapreadport.port` | Haproxy port for read only redis slaves | `6380` | diff --git a/charts/redis-ha/templates/redis-haproxy-service.yaml b/charts/redis-ha/templates/redis-haproxy-service.yaml index 9a8a551..2feff9b 100644 --- a/charts/redis-ha/templates/redis-haproxy-service.yaml +++ b/charts/redis-ha/templates/redis-haproxy-service.yaml @@ -28,6 +28,12 @@ spec: {{- if and (eq .Values.haproxy.service.type "LoadBalancer") .Values.haproxy.service.loadBalancerSourceRanges }} loadBalancerSourceRanges: {{ toYaml .Values.haproxy.service.loadBalancerSourceRanges | nindent 2 }} {{- end }} + {{- if .Values.haproxy.service.externalIPs }} + externalIPs: + {{- range $key, $value := .Values.haproxy.service.externalIPs }} + - {{ $value }} + {{- end }} + {{- end }} ports: - name: tcp-haproxy port: {{ .Values.haproxy.servicePort }} diff --git a/charts/redis-ha/values.yaml b/charts/redis-ha/values.yaml index 0f14820..9077b64 100644 --- a/charts/redis-ha/values.yaml +++ b/charts/redis-ha/values.yaml @@ -116,6 +116,7 @@ haproxy: service: type: ClusterIP loadBalancerIP: + externalIPs: {} labels: {} annotations: null