Skip to content

Commit d0afe7a

Browse files
feat(redis-ha): add headless service and dual-stack support for HAProxy (#403)
* feat(redis-ha): add clusterIP, ipFamilyPolicy, and ipFamilies to HAProxy service Adds three new optional fields to haproxy.service: - clusterIP: set to "None" for a headless service returning pod IPs directly (#388) - ipFamilyPolicy: configure IP family policy for dual-stack clusters (#366) - ipFamilies: list of IP families (e.g. ["IPv4","IPv6"]) for dual-stack support (#366) All fields default to empty/unset, leaving existing deployments unchanged. Closes #388 Closes #366 https://claude.ai/code/session_015PLT3F82jivLQrxjfV9Hgg * Update chart Signed-off-by: Aaron Layfield <aaron.layfield@gmail.com> --------- Signed-off-by: Aaron Layfield <aaron.layfield@gmail.com> Co-authored-by: Claude <noreply@anthropic.com>
1 parent f4aadb7 commit d0afe7a

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

charts/redis-ha/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ keywords:
55
- redis
66
- keyvalue
77
- database
8-
version: 4.35.10
8+
version: 4.36.0
99
appVersion: 8.2.4
1010
description: This Helm chart provides a highly available Redis implementation with a master/slave configuration and uses Sentinel sidecars for failover management
1111
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

charts/redis-ha/templates/redis-haproxy-service.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ metadata:
1919
{{- end }}
2020
spec:
2121
type: {{ default "ClusterIP" .Values.haproxy.service.type }}
22+
{{- if .Values.haproxy.service.clusterIP }}
23+
clusterIP: {{ .Values.haproxy.service.clusterIP }}
24+
{{- end }}
25+
{{- if .Values.haproxy.service.ipFamilyPolicy }}
26+
ipFamilyPolicy: {{ .Values.haproxy.service.ipFamilyPolicy }}
27+
{{- end }}
28+
{{- if .Values.haproxy.service.ipFamilies }}
29+
ipFamilies: {{ toYaml .Values.haproxy.service.ipFamilies | nindent 2 }}
30+
{{- end }}
2231
{{- if and (eq .Values.haproxy.service.type "LoadBalancer") .Values.haproxy.service.loadBalancerIP }}
2332
loadBalancerIP: {{ .Values.haproxy.service.loadBalancerIP }}
2433
{{- end }}

charts/redis-ha/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ haproxy:
182182
service:
183183
# -- HAProxy service type "ClusterIP", "LoadBalancer" or "NodePort"
184184
type: ClusterIP
185+
# -- HAProxy service clusterIP. Set to "None" to create a headless service.
186+
clusterIP: ""
185187
# -- (int) HAProxy service nodePort value (haproxy.service.type must be NodePort)
186188
nodePort: ~
187189
# -- HAProxy service loadbalancer IP
@@ -197,6 +199,10 @@ haproxy:
197199

198200
# -- List of CIDR's allowed to connect to LoadBalancer
199201
loadBalancerSourceRanges: []
202+
# -- HAProxy service IP family policy for dual-stack clusters
203+
ipFamilyPolicy: ""
204+
# -- HAProxy service IP families (e.g. ["IPv4", "IPv6"] for dual-stack)
205+
ipFamilies: []
200206

201207
# -- HAProxy serviceAccountName
202208
serviceAccountName: redis-sa

0 commit comments

Comments
 (0)