This repository was archived by the owner on Mar 5, 2024. It is now read-only.
Add deeper healthcheck for agent#268
Merged
Joseph-Irving merged 1 commit intouswitch:masterfrom Aug 9, 2019
Merged
Conversation
Currently the agent health endpoint just checks that it can return some metadata from AWS. I would also like to be able to check that the agent is able to communticate succsessfully with the server. The motivation is that we are renewing certificates externally and when the client cert expires the agent will fail to talk to the server. In this case I want the healthcheck to fail so that kubernetes will restart the agent and cause it to re-read (the now renewed certs) from disk. I've implemented this as a URL query param so that doing /health will continue to function the same but /health?deep=anything will also do a grpc call to the server and assert the health endpoint there returns "ok"
|
Thanks for this! |
Contributor
Author
|
@pingles any thoughts on this? |
Contributor
|
Looks good, @uswitch/cloud comments? |
Joseph-Irving
approved these changes
Aug 9, 2019
Contributor
Joseph-Irving
left a comment
There was a problem hiding this comment.
I think this looks good, will update the readme to include this info somewhere
Thanks!
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Currently the agent health endpoint just checks that it can return some
metadata from AWS. I would also like to be able to check that the agent
is able to communticate succsessfully with the server. The motivation is
that we are renewing certificates externally and when the client cert
expires the agent will fail to talk to the server. In this case I want
the healthcheck to fail so that kubernetes will restart the agent and
cause it to re-read (the now renewed certs) from disk.
I've implemented this as a URL query param so that doing
/healthwillcontinue to function the same but
/health?deep=anythingwill also do agrpc call to the server and assert the health endpoint there returns
"ok"