Skip to content

Feat/lifecycle prestop - #2

Open
jose-10000 wants to merge 4 commits into
khtee:mainfrom
jose-10000:feat/lifecycle-prestop
Open

Feat/lifecycle prestop#2
jose-10000 wants to merge 4 commits into
khtee:mainfrom
jose-10000:feat/lifecycle-prestop

Conversation

@jose-10000

Copy link
Copy Markdown

Hi khtee,
I noticed that during updates or pod rotations, the instances weren't closing gracefully. This was causing synchronization issues with Sentinel and increasing the risk of data loss.

To mitigate this, I’ve added a preStop lifecycle hook. This ensures the node handles the shutdown sequence correctly, allowing Sentinel to manage the failover properly before the container terminates.
have a nice day

Add lifecycle preStop hook to execute a script before stopping the container. Also, mount additional scripts and user secrets for the valkey server.

Signed-off-by: Jose Dominguez <114358350+jose-10000@users.noreply.github.com>
Added a preStop hook script to handle master role failover via Sentinel before pod termination.

Signed-off-by: Jose Dominguez <114358350+jose-10000@users.noreply.github.com>
Added clientPauseTimeout to configure pause duration during prestop failover.

Signed-off-by: Jose Dominguez <114358350+jose-10000@users.noreply.github.com>
I've added the workloadAnnotations block to haproxy-deployment.yaml. I noticed that the upstream main branch recently introduced workloadAnnotations for other workloads, so adding it here ensures HAProxy is aligned with main once this PR is eventually merged.

Signed-off-by: Jose Dominguez <114358350+jose-10000@users.noreply.github.com>
@jose-10000 jose-10000 closed this Jun 12, 2026
@jose-10000 jose-10000 reopened this Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant