Repository navigation
Add apiserver-monitor problem daemon - #1387
Conversation
|
Hi @bjencks. Thanks for your PR. I'm waiting for a kubernetes 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. |
|
/ok-to-test |
2711d59 to
24432ed
Compare
wangzhen127
left a comment
There was a problem hiding this comment.
Could you add e2e coverage? The unit tests only cover inClusterConfig=false over plain/insecure HTTP, so the real in-cluster path (CA + SA token + protobuf Accept against the real /version) never runs. Cheapest options: (a) a kustomize patch in test/e2e/manifests/ that adds --config.apiserver-monitor=/config/apiserver-monitor.json for the GCE cluster jobs — a smoke test of the in-cluster path on a real API server (DaemonSet stays Ready, problem_counter{reason="APIServerUnreachable"} stays 0); (b) in test/e2e/metriconly, a context that starts NPD with --apiserver-override=http://127.0.0.1:1?inClusterConfig=false and a short-interval config and asserts problem_gauge{type="APIServerUnreachable",reason="APIServerUnreachable"} == 1. Both work in metricsOnly mode since they check metrics; either needs its own short-interval config, which is another reason to settle the defaults.
|
|
Add a new built-in problem daemon plugin (apiserver-monitor) that checks connectivity to the Kubernetes API server. It specifically creates a new client on every poll in order to test the full stack from TCP connection up. This required moving kube_rest.Config creation from problemclient into pkg/util (util.NewKubeClientConfig) and initializing util.GlobalKubeClientConfig in npdMain for both problemclient and apiserver-monitor to consume.
|
/lgtm Feel free to unhold to merge when you are ready. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bjencks, wangzhen127 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold cancel |
Add a new built-in problem daemon plugin (apiserver-monitor) that checks connectivity to the Kubernetes API server.
It specifically creates a new client on every poll in order to test the full stack from TCP connection up.
This required moving kube_rest.Config creation from problemclient into pkg/util (util.NewKubeClientConfig) and initializing util.GlobalKubeClientConfig in npdMain for both problemclient and apiserver-monitor to consume.