11 Commits

Author SHA1 Message Date
Yang Guo
938f2a8aa8 Support waiting for kube-apiserver to be ready with timout during NPD startup 2019-07-12 13:26:56 -07:00
Kenjiro Nakayama
a248e2a842 Add validation for the required flag
If --system-log-monitors or --custom-plugin-monitors are not
specified, npd gave us unclear message.

This patch adds the validation and clear error message.
2019-01-17 13:38:19 +09:00
SataQiu
91adf37050 fix typo: NDDE -> NODE, permenantly -> permanently 2018-11-21 17:36:08 +08:00
gkGaneshR
821b8f41aa Modify unit testing of cmd/options
1. Why is this change necessary ?
   Modify unit testing of options in such a way that we specify
the WantedNodeName

2. How to verify this change ?
   Run, make test

Signed-off-by: gkGaneshR <gkganesh126@gmail.com>
2018-03-09 13:17:52 +05:30
gkGaneshR
ca76dc12ee Add dot(.) at the end of comments
Signed-off-by: gkGaneshR <gkganesh126@gmail.com>
2018-03-09 12:08:05 +05:30
gkGaneshR
c75a35099e Avoided changing hostname and changing var names
1. Why is this change necessary ?
 The program avoids changing hostname and the variable name "Options" is changed to
"options". Also, added more comments and formatted. Removed hostname in options since
it will not be changed in tests.

2. How does this change address the issue ?
 While the program is being run, the hostname is not changed. And options can't be
accessed outside(not exported).

3. How to verify this change ?
 Run, make test

Signed-off-by: gkGaneshR <gkganesh126@gmail.com>
2018-03-05 13:49:10 +05:30
gkGaneshR
a591ce52f9 Added copyright 2018 statement
1. Why is this change necessary ?
 Added copyright 2018 statement on options_test.go and added space
between // and text on the comments.

Signed-off-by: gkGaneshR <gkganesh126@gmail.com>
2018-03-04 21:05:16 +05:30
gkGaneshR
25b6c169a2 Unit testing for SetNodeNameOrDie in package cmd/options
1. Why is this change necessary ?
fixes: kubernetes/node-problem-detector#161

2. How does this change address the issue ?
Under package cmd/options, the testing for SetNodeNameOrDie need
to decide Nodename based on environment variable "NODE_NAME" or
hostname or hostnameoverride variable.

3. How to verify this change ?
Run "go test" with admin privilege

Signed-off-by: gkGaneshR <gkganesh126@gmail.com>
2018-03-02 21:03:59 +05:30
Andy Xie
10dbfef1a8 add custom problem detector plugin 2017-11-22 10:14:09 +08:00
Ajit Kumar
5cfe97cd15 change NPD port 2017-07-20 10:36:41 -07:00
Andy Xie
0a914cae09 refactor options pkg 2017-02-23 08:23:52 +08:00