feat: add npd-prober example showing NPD + NRC integration for node readiness#159
feat: add npd-prober example showing NPD + NRC integration for node readiness#159santoshkal wants to merge 1 commit intokubernetes-sigs:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: santoshkal The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for node-readiness-controller canceled.
|
|
|
|
Welcome @santoshkal! |
|
Hi @santoshkal. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
I think we should also expand npd-prober to support gRPC, file, and generic exec/command probes as part of this same effort. Even though Node Problem Detector natively supports executing scripts, pulling all of these standard Kubernetes-style probe methods (http, tcp, grpc, file, exec) into a single, unified npd-prober binary would make the user experience much cleaner and would avoid redundant code examples in the repo. I believe including these additions now will cover the vast majority of node-readiness-controller + node-problem-detector integration use cases out-of-the-box. What do you think? cc @ajaysundark p.s. happy to create another issue for this and work on it/even ready to assist |
Description
Adds a complete npd-prober example demonstrating how to use Node Problem Detector (NPD)
custom plugins with the Node Readiness Controller (NRC) to manage node taints based on
HTTP/TCP health probes.
and TCP semantics, designed as an NPD custom plugin. Includes
--allow-non-local-redirectsflag matching kubelet behavior, and structured logging via klog/v2.
maps exit codes to a
ServiceReadinessnode condition.readiness.k8s.io/ServiceReady=pending:NoScheduletaint based on probe health.NPD → condition → NRC → taint pipeline on a local Kind cluster, including failure
simulation via service port misconfiguration.
Documents NPD's problem-oriented condition semantics (exit 0 = condition False, exit 1 =
condition True) and how this maps to
requiredStatus: "False"in the NodeReadinessRule.Related Issue
Fixes #138
Type of Change
/kind feature
Testing
Checklist
go test ./examples/npd-prober/ -v— all unit tests passgo vet ./examples/npd-prober/— no issuestesting-npd.mdon a Kind cluster to verify end-to-end flowDoes this PR introduce a user-facing change?
NONE
Doc #(issue)