From 2d818518b7c22040c41966b7975978d267e4aa1d Mon Sep 17 00:00:00 2001 From: Mikhail Koniakhin Date: Mon, 2 Feb 2026 13:23:12 +0200 Subject: [PATCH] feat(redis-ha): add haproxy.globalConfig parameter Add support for HAProxy global section configuration via new haproxy.globalConfig parameter. This allows users to configure global HAProxy settings like logging and performance tuning without replacing the entire configuration. The global section is inserted before the 'defaults' section in the generated haproxy.cfg when haproxy.customConfig is not set. --- charts/redis-ha/Chart.yaml | 2 +- charts/redis-ha/README.md | 1 + charts/redis-ha/templates/_configs.tpl | 4 ++++ charts/redis-ha/values.yaml | 9 +++++++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/charts/redis-ha/Chart.yaml b/charts/redis-ha/Chart.yaml index 0874fba..1bf99e4 100644 --- a/charts/redis-ha/Chart.yaml +++ b/charts/redis-ha/Chart.yaml @@ -5,7 +5,7 @@ keywords: - redis - keyvalue - database -version: 4.35.7 +version: 4.35.8 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 15476b4..d27a348 100644 --- a/charts/redis-ha/README.md +++ b/charts/redis-ha/README.md @@ -256,6 +256,7 @@ The following table lists the configurable parameters of the Redis chart and the | `haproxy.emptyDir` | Configuration of `emptyDir` | object | `{}` | | `haproxy.enabled` | Enabled HAProxy LoadBalancing/Proxy | bool | `false` | | `haproxy.extraConfig` | Allows to place any additional configuration section to add to the default config-haproxy.cfg | string | `nil` | +| `haproxy.globalConfig` | Allows to place HAProxy global section configuration. Inserted before defaults section. | string | `nil` | | `haproxy.hardAntiAffinity` | Whether the haproxy pods should be forced to run on separate nodes. | bool | `true` | | `haproxy.image.pullPolicy` | HAProxy Image PullPolicy | string | `"IfNotPresent"` | | `haproxy.image.repository` | HAProxy Image Repository | string | `"public.ecr.aws/docker/library/haproxy"` | diff --git a/charts/redis-ha/templates/_configs.tpl b/charts/redis-ha/templates/_configs.tpl index 320b08d..78f2daa 100644 --- a/charts/redis-ha/templates/_configs.tpl +++ b/charts/redis-ha/templates/_configs.tpl @@ -543,6 +543,10 @@ {{- if .Values.haproxy.customConfig }} {{ tpl .Values.haproxy.customConfig . | indent 4 }} {{- else }} +{{- if .Values.haproxy.globalConfig }} + # Global configuration +{{ tpl .Values.haproxy.globalConfig . | indent 4 }} +{{- end }} defaults REDIS mode tcp timeout connect {{ .Values.haproxy.timeout.connect }} diff --git a/charts/redis-ha/values.yaml b/charts/redis-ha/values.yaml index f093ed2..a814b2b 100644 --- a/charts/redis-ha/values.yaml +++ b/charts/redis-ha/values.yaml @@ -287,6 +287,15 @@ haproxy: # customConfig: |- # Define configuration here + ## Global HAProxy configuration section. This is inserted before the 'defaults' section. + ## Use this to configure global HAProxy settings like logging, performance tuning, etc. + # -- (string) Allows to place HAProxy global section configuration. Inserted before defaults section. + globalConfig: ~ + # globalConfig: |- + # global + # log stdout format raw local0 + # maxconn 4096 + ## Place any additional configuration section to add to the default config-haproxy.cfg # -- (string) Allows to place any additional configuration section to add to the default config-haproxy.cfg extraConfig: ~