This has several benefits. For example, now I can develop and build linux binaries of the NPD on my mac. Also other devs don't need to make sure they have the systemd headers installed.
The label on the pod is `app: node-problem-detector` while the
label in the `labelSelector` was `name: node-problem-detector`.
This CL updates the `labelSelector` to use `app` rather than `name`.
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>
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>
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>
1. Why is this change necessary ?
Solves kubernetes/node-problem-detector#163
2. How does this change address the issue ?
Unit testing for node-problem-detector/cmd/options is yet to be
done and the corresponding package path needs to be included in makefile
test
3. How to verify this change ?
make test command should run the test TestSetNodeNameOrDie with admin
privileges.
Signed-off-by: gkGaneshR <gkganesh126@gmail.com>
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>