-
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
base: master
Are you sure you want to change the base?
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. |
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