-
Notifications
You must be signed in to change notification settings - Fork 53
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
Dataplane: Add gRPC health check #182
Dataplane: Add gRPC health check #182
Conversation
94020b5
to
c2836d4
Compare
c2836d4
to
c3da400
Compare
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.
Awesome, thanks for adding this @Shunpoco! 🥳
One thing we'll need to add is somewhere in the test a simple verification. I think right after deploying the dataplane just a requires.Eventually()
that ensures we reached the expected state would be suffiient for now.
@shaneutt |
To me this seems like enough of an iterative improvement for now that we can move forward with this, see how it works out, and maybe down the road considering if we want to do more. |
Hey @Shunpoco just checking in, everything going OK? Need any assistance? |
@shaneutt |
@Shunpoco, did you see my comment above about adding a test? Are you comfortable with adding a |
@shaneutt |
Yeah, my thinking was this: you're right that the current tests effectively exercise the health checks, but nothing is verifying their presence or configuration. A simple couple line check could help us to avoid regressions (though we would hope they would never happen!) or mistakes in test configuration later on and just double check that the health checks are present, and are configured as intended. Let me know what you think? |
I got it. I will add the verification. I pushed da1be5f as a draft of the verification (I will blush up after I confirm we have the same view).
Note: Because TestMain doesn't take testing.T, I don't use require.Eventually. Does this change suit for your intention? |
Yep, this looks good. Might seem a little superfluous but I appreciate you adding it as a documentation of intent, and on the off chance the health checks fail, now we can fail at a very specific place with specific logging which will be easier for debugging. I'll mark this draft temporarily since you said you wanted to do a couple more things, please mark as ready and call me in for a final review whenever you're ready. Very much appreciate your contribution! |
da1be5f
to
c7fc302
Compare
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.
Looking good!
Couple minor comments to sort out then I think we're ready to 🚢
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.
looks pretty good, just have a couple of nits. also it'd be great if you could squash all your commits into 1-2 concise commits, thanks!
Currently our dataplane server doesn't have health check, so we can't confirm whether the dataplane daemonset runs properly or not. This PR introduce health check for gRPC to the dataplane server, and add liveness, readiness, and startup probe for the daemonset. Signed-off-by: Shunsuke Tokunaga <tkngsnsk313320@gmail.com> Co-authored-by: Shane Utt <shane@shaneutt.com>
This commit adds a validation function for dataplane. The function first checks whethre a dataplane pod has readiness probe setting. Then it checks all dataplane pods' readiness status. If all pods are ready, it finishes with no error. Signed-off-by: Shunsuke Tokunaga <tkngsnsk313320@gmail.com> Co-authored-by: Shane Utt <shane@shaneutt.com> Co-authored-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
e2aa15d
to
d1351f4
Compare
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.
LGTM!
Thanks @Shunpoco 🎖️
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aryan9600, shaneutt, Shunpoco The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Currently our dataplane server doesn't have health check, so we can't confirm whether the dataplane daemonset runs properly or not.
This PR introduce health check for gRPC to the dataplane server, and add liveness, readiness, and startup probe for the daemonset.
Fixes: #51