Both outputs are currently hardcoded to being enabled, this allows disabling one or the other. Defaults to both enabled to retain current behavior.
Larger clusters can save some etcd I/O by skipping one of these outputs if they aren't being consumed. In our case we aren't consuming the Events so writing them just creates more churn.
Added package problemdaemon. All future problem daemons should be
registered by calling problemdaemon.register().
CLI interfaces will be automatically generated for all registered
problem daemons in the form of "--config.DAEMON_NAME"
Added CLI option "enable-k8s-exporter" (default to true). Users can use
this option to enable/disable exporting to Kubernetes control plane.
This commit also removes all the apiserver-specific logic from package
problemdetector.
Future exporters (e.g. to local journald, Prometheus, other control
planes) should implement types.Exporter interface.
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.
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 ?
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>