From cd9baf1a699b1726ea46b03f1b8727167aaaa2fb Mon Sep 17 00:00:00 2001 From: Mikhail Koniakhin Date: Mon, 16 Feb 2026 12:52:48 +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. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus Signed-off-by: Mikhail Koniakhin --- charts/redis-ha/Chart.yaml | 12 ++++++------ charts/redis-ha/README.md | 1 + charts/redis-ha/templates/_configs.tpl | 4 ++++ charts/redis-ha/values.yaml | 9 +++++++++ 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/charts/redis-ha/Chart.yaml b/charts/redis-ha/Chart.yaml index d4e21a86..228d6c8e 100644 --- a/charts/redis-ha/Chart.yaml +++ b/charts/redis-ha/Chart.yaml @@ -5,14 +5,14 @@ keywords: - redis - keyvalue - database -version: 4.39.0 +version: 4.39.1 appVersion: 8.8.0 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 maintainers: -- email: aaron.layfield@gmail.com - name: dandydeveloper + - email: aaron.layfield@gmail.com + name: dandydeveloper sources: -- https://redis.io/download -- https://github.com/DandyDeveloper/charts/blob/master/charts/redis-ha -- https://github.com/oliver006/redis_exporter + - https://redis.io/download + - https://github.com/DandyDeveloper/charts/blob/master/charts/redis-ha + - https://github.com/oliver006/redis_exporter diff --git a/charts/redis-ha/README.md b/charts/redis-ha/README.md index 56eaf46b..226a9b8e 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 450d1293..0dc0c8eb 100644 --- a/charts/redis-ha/templates/_configs.tpl +++ b/charts/redis-ha/templates/_configs.tpl @@ -564,6 +564,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 95ad969f..4043851e 100644 --- a/charts/redis-ha/values.yaml +++ b/charts/redis-ha/values.yaml @@ -293,6 +293,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: ~