Access logs lifecycle#110
Conversation
jcmoraisjr
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
There's already an ongoing update and tests to move log and external haproxy containers as native sidecars which makes the lifecycle configuration without a clear proposal.
It looks good anyway, since we already have distinct lifecycle configurations for controller and external haproxy, this one is easier to backport to older branches, and this could also be used for niche or very specific use cases even on native sidecar deployments.
It is missing however the update in the readme file, and since you're already updating the PR, I also pointed a nitpicking in the values update.
|
Thanks for the comments - I've addressed them :) Cool to know about the move to native sidecar containers 💪 |
Add
controller.logs.lifecycleto the access-logs sidecar container template, matching the pattern already used by the controller and haproxy containers.This allows configuring a
preStophook on the syslog sidecar — useful when thehaproxycontainer also has alifecyclerule to, for example, need a drain period before termination. Without this, the syslog container can exit before HAProxy finishes serving in-flight requests, causing those requests to go unlogged.