-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cli): add 'drain' CLI command to set /status/ready to 503 #13838
Conversation
This command updates the `/status/ready` endpoint to return a `503 Service Unavailable` status code. This allows external tools, such as Kubernetes, to detect when Kong is not ready to receive traffic. Based on this response, Kubernetes can gracefully remove Kong from its load balancing pool according to its configured policies, facilitating a smooth shutdown process. Fix: [FTI-6276](https://konghq.atlassian.net/browse/FTI-6276) Signed-off-by: tzssangglass <[email protected]>
Signed-off-by: tzssangglass <[email protected]>
Signed-off-by: tzssangglass <[email protected]>
Signed-off-by: tzssangglass <[email protected]>
Signed-off-by: tzssangglass <[email protected]>
Signed-off-by: tzssangglass <[email protected]>
Signed-off-by: tzssangglass <[email protected]>
Signed-off-by: tzssangglass <[email protected]>
Signed-off-by: tzssangglass <[email protected]>
Signed-off-by: tzssangglass <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve with one minor suggestion
apply comments Co-authored-by: Keery Nie <[email protected]>
hi @mheap , PTAL this PR, it add a new command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tzssangglass Is there an internal spike doc with the alternatives we looked into for solving this issue? I am curious if adding yet another command isn't overcomplicating things -- maybe it's the best option, but I'm curious if this is the best interface we can provide among the options we researched. Adding new commands to the CLI increases complexity in a non-negligible way.
Signed-off-by: tzssangglass <[email protected]>
We do not have an internal spike doc recording this or an alternative solution; This was derived from discussions with members of the k8s team. |
Signed-off-by: tzssangglass <[email protected]>
Signed-off-by: tzssangglass <[email protected]>
Cherry-pick failed for Please cherry-pick the changes locally. git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-13838-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-13838-to-master-to-upstream
git checkout -b cherry-pick-13838-to-master-to-upstream
ancref=$(git merge-base d4ab528fa2414d996861a43e58406c02b4978157 6640567c919125171d584ee2095125d0d233a093)
git cherry-pick -x $ancref..6640567c919125171d584ee2095125d0d233a093 |
* feat(cli): add 'unready' CLI command to set /status/ready to 503 This command updates the `/status/ready` endpoint to return a `503 Service Unavailable` status code. This allows external tools, such as Kubernetes, to detect when Kong is not ready to receive traffic. Based on this response, Kubernetes can gracefully remove Kong from its load balancing pool according to its configured policies, facilitating a smooth shutdown process. Fix: [FTI-6276](https://konghq.atlassian.net/browse/FTI-6276) Signed-off-by: tzssangglass <[email protected]> --------- Signed-off-by: tzssangglass <[email protected]>
* feat(cli): add 'unready' CLI command to set /status/ready to 503 This command updates the `/status/ready` endpoint to return a `503 Service Unavailable` status code. This allows external tools, such as Kubernetes, to detect when Kong is not ready to receive traffic. Based on this response, Kubernetes can gracefully remove Kong from its load balancing pool according to its configured policies, facilitating a smooth shutdown process. Fix: [FTI-6276](https://konghq.atlassian.net/browse/FTI-6276) Signed-off-by: tzssangglass <[email protected]>
Summary
This command updates the
/status/ready
endpoint to return a503 Service Unavailable
status code. This allows external tools, such as Kubernetes, to detect when Kong is not ready to receive traffic. Based on this response, Kubernetes can gracefully remove Kong from its load balancing pool according to its configured policies, facilitating a smooth shutdown process.Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
Fix: FTI-6276