-
Notifications
You must be signed in to change notification settings - Fork 631
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
Add NPD endpoints: /debug/pprof, /healthz, /conditions. #83
Conversation
@andyxning I need the pprof endpoint to work on the performance stuff, so send the PR first. Hope you haven't started working on that. |
@Random-Liu Yes, i have not spare some time to do this. Since you have done this, i will make a review on this. :) |
@andyxning Thanks. I know it's Spring Festival soon. Enjoy yourself! :) |
@andyxning Add you as the reviewer. Thanks a lot! |
44f98ad
to
4111a3e
Compare
Review status: 0 of 6 files reviewed at latest revision, 7 unresolved discussions, some commit checks failed. Makefile, line 34 at r2 (raw file):
SGTM cmd/node_problem_detector.go, line 44 at r2 (raw file):
cmd/node_problem_detector.go, line 45 at r2 (raw file):
Any special considerations for using cmd/node_problem_detector.go, line 96 at r2 (raw file):
cmd/node_problem_detector.go, line 116 at r2 (raw file):
pkg/condition/manager.go, line 62 at r2 (raw file):
we need to refactor the code since #79 has been merged. pkg/util/http.go, line 23 at r2 (raw file):
SGTM Comments from Reviewable |
@Random-Liu Sorry for the delay. It is Spring Festival holidays. :) |
Review status: 0 of 6 files reviewed at latest revision, 9 unresolved discussions, some commit checks failed. pkg/util/http.go, line 24 at r2 (raw file):
pkg/util/http.go, line 36 at r2 (raw file):
Comments from Reviewable |
No problem at all. Enjoy your holiday! :) Comments from Reviewable |
Review status: 0 of 6 files reviewed at latest revision, 9 unresolved discussions, some commit checks failed. cmd/node_problem_detector.go, line 44 at r2 (raw file):
Will do.
Good catch. As far as I know, there is no standards for port usage for now. I choose 10254 because it is not used in https://github.com/kubernetes/kubernetes/blob/master/pkg/master/ports/ports.go
Actually I copy the code from https://github.com/kubernetes/kubernetes/blob/master/cmd/kubelet/app/options/options.go#L106. I don't think we want to select port randomly, let's just keep the behavior the same with kubelet for now. :) cmd/node_problem_detector.go, line 45 at r2 (raw file): Previously, andyxning (Ning Xie) wrote…
Actually, kube-proxy and kubelet use Hm, let's use cmd/node_problem_detector.go, line 96 at r2 (raw file): Previously, andyxning (Ning Xie) wrote…
You are right. Will change to fatal and remove the loop. Comments from Reviewable |
4111a3e
to
ebc71ad
Compare
Review status: 0 of 6 files reviewed at latest revision, 9 unresolved discussions. cmd/node_problem_detector.go, line 44 at r2 (raw file): Previously, Random-Liu (Lantao Liu) wrote…
Done. cmd/node_problem_detector.go, line 45 at r2 (raw file): Previously, Random-Liu (Lantao Liu) wrote…
Done. cmd/node_problem_detector.go, line 96 at r2 (raw file): Previously, Random-Liu (Lantao Liu) wrote…
Done. pkg/condition/manager.go, line 62 at r2 (raw file): Previously, andyxning (Ning Xie) wrote…
Done. pkg/util/http.go, line 24 at r2 (raw file): Previously, andyxning (Ning Xie) wrote…
Done. pkg/util/http.go, line 36 at r2 (raw file): Previously, andyxning (Ning Xie) wrote…
Done. Comments from Reviewable |
@andyxning Addressed comments. PTAL~ |
Review status: 0 of 6 files reviewed at latest revision, 6 unresolved discussions. cmd/node_problem_detector.go, line 116 at r2 (raw file): Previously, andyxning (Ning Xie) wrote…
Since we need to keep up with kubelet, this should not be modified. :) LGTM pkg/condition/manager.go, line 62 at r2 (raw file): Previously, Random-Liu (Lantao Liu) wrote…
nit: pkg/condition/manager_test.go, line 85 at r3 (raw file):
LGTM pkg/problemdetector/problem_detector.go, line 81 at r3 (raw file):
LGTM pkg/util/http.go, line 23 at r2 (raw file): Previously, andyxning (Ning Xie) wrote…
LGTM Comments from Reviewable |
Reviewed 1 of 6 files at r1, 1 of 1 files at r2, 3 of 3 files at r3. Comments from Reviewable |
@Random-Liu just one nit. Overall LGTM. |
pkg/condition/manager.go, line 62 at r2 (raw file): Previously, andyxning (Ning Xie) wrote…
Done. Comments from Reviewable |
ebc71ad
to
20ffe37
Compare
@andyxning Thanks for reviewing! Apply LGTM based on #83 (comment). |
Reviewed 1 of 1 files at r4. Comments from Reviewable |
/lgtm Review status: all files reviewed at latest revision, 5 unresolved discussions. Comments from Reviewable |
Will a readiness probe be added in the future? I can see that some changes haven't been merged yet. |
For #76.
This PR:
/healthz
for health checking. Currently it always returns 200./conditions
to list all internal conditions inside the NPD. This is mainly used for debugging./debug/pprof
pprof endpoint. This will be used for following performance benchmark and optimization.Note that to get more debug information, we removed the
-w
ldflag. The binary size only increased from 40MB+ to 60MB+, which should be fine.This change is