Feat/lifecycle prestop - #2
Open
jose-10000 wants to merge 4 commits into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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