From 5b3ef7a700ac8a3860787f6f2c5c377fe9794a0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Gon=C3=A7alves?= Date: Thu, 28 May 2026 15:30:09 +0200 Subject: [PATCH 1/4] Add lifecycle support to access-logs sidecar container --- haproxy-ingress/values.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/haproxy-ingress/values.yaml b/haproxy-ingress/values.yaml index 2841fd9..e2b49ff 100644 --- a/haproxy-ingress/values.yaml +++ b/haproxy-ingress/values.yaml @@ -612,7 +612,9 @@ controller: ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ ## securityContext: {} - + + # If lifecycle is added to the haproxy container, it can be useful to also configure it here to ensure the syslog container is not killed before haproxy when the pod is terminating, allowing it to flush the logs properly. + lifecycle: {} # port used by syslog container port: 514 From 925ac672c7d9027928478b150171b28b02bbea21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Gon=C3=A7alves?= Date: Thu, 28 May 2026 15:31:04 +0200 Subject: [PATCH 2/4] Add lifecycle support to access-logs sidecar container --- haproxy-ingress/templates/_podtemplate.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/haproxy-ingress/templates/_podtemplate.yaml b/haproxy-ingress/templates/_podtemplate.yaml index 2355505..28a8011 100644 --- a/haproxy-ingress/templates/_podtemplate.yaml +++ b/haproxy-ingress/templates/_podtemplate.yaml @@ -219,6 +219,10 @@ spec: securityContext: {{- toYaml .Values.controller.logs.securityContext | nindent 8 }} {{- end }} +{{- if .Values.controller.logs.lifecycle }} + lifecycle: + {{- toYaml .Values.controller.logs.lifecycle | nindent 8 }} +{{- end }} {{- end }} {{- if and .Values.controller.stats.enabled .Values.controller.metrics.enabled (not .Values.controller.metrics.embedded) }} - name: prometheus-exporter From 811b300017a4aefe7e4e50d3a340909471cc60e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Gon=C3=A7alves?= Date: Tue, 2 Jun 2026 22:59:49 +0200 Subject: [PATCH 3/4] lint --- haproxy-ingress/values.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/haproxy-ingress/values.yaml b/haproxy-ingress/values.yaml index e2b49ff..6511fc6 100644 --- a/haproxy-ingress/values.yaml +++ b/haproxy-ingress/values.yaml @@ -612,7 +612,6 @@ controller: ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ ## securityContext: {} - # If lifecycle is added to the haproxy container, it can be useful to also configure it here to ensure the syslog container is not killed before haproxy when the pod is terminating, allowing it to flush the logs properly. lifecycle: {} # port used by syslog container From 5e507bcbcb9dc15a18d3347f4bddccd514e7e03a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Gon=C3=A7alves?= Date: Tue, 2 Jun 2026 23:16:04 +0200 Subject: [PATCH 4/4] Update README.md --- haproxy-ingress/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/haproxy-ingress/README.md b/haproxy-ingress/README.md index be72e96..9c814ff 100644 --- a/haproxy-ingress/README.md +++ b/haproxy-ingress/README.md @@ -259,6 +259,7 @@ Parameter | Description | Default `controller.logs.port` | port used by sidecar logs container | `514` `controller.logs.probes` | enable tcp based liveness and readiness probes in the log container | `false` `controller.logs.securityContext` | Security context settings for sidecar logs container | `{}` +`controller.logs.lifecycle` | Lifecycle hooks for sidecar logs container | `{}` `controller.logs.resources` | access-logs container resource requests & limits | `{}` `defaultBackend.enabled` | whether to use the default backend component | `false` `defaultBackend.name` | name of the default backend component | `default-backend`