-
Notifications
You must be signed in to change notification settings - Fork 16.7k
[stable/node-problem-detector] adds custom-plugin-monitor config #10549
[stable/node-problem-detector] adds custom-plugin-monitor config #10549
Conversation
f2b8adf
to
683bd50
Compare
4edd27c
to
0b141d0
Compare
0b141d0
to
26eb44f
Compare
cc @max-rocket-internet Could you kindly review this PR. I believe I checklisted everything that needs to be done as a first time contributor. Let me know if I'm missing something. |
@@ -31,6 +31,7 @@ $ helm delete my-release | |||
## Configuration | |||
|
|||
Custom System log monitor config files can be created, see [here](https://github.com/kubernetes/node-problem-detector/tree/master/config) for examples. | |||
Custom Plugin monitor config files have to be passed under `settings.custom_plugin_monitors` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this line and put it in the table of parameters below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -31,7 +31,7 @@ spec: | |||
command: | |||
- "/bin/sh" | |||
- "-c" | |||
- "exec /node-problem-detector --logtostderr --system-log-monitors={{- range $index, $monitor := .Values.settings.log_monitors }}{{if ne $index 0}},{{end}}{{ $monitor }}{{- end }}" | |||
- "exec /node-problem-detector --logtostderr --system-log-monitors={{- range $index, $monitor := .Values.settings.log_monitors }}{{if ne $index 0}},{{end}}{{ $monitor }}{{- end }} --custom-plugin-monitors={{- range $index, $monitor := .Values.settings.custom_plugin_monitors }}{{if ne $index 0}},{{end}}{{ $monitor }}{{- end }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this going to work by default when settings. custom_plugin_monitors
is just an empty map? Won't npd be run with the --custom-plugin-monitors=
argument but with no value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tried fixing this with:
{- if .Values.settings.custom_plugin_monitors }} ... {{- end}}
Please let me know if that is adequate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Hashfyre please avoid force pushing as it prevents us seeing the changes you make after the review. Can you also address the other comment I made about the README?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, fixed that. Will keep the no force-push policy in mind.
26eb44f
to
4ea785b
Compare
4ea785b
to
10fcd30
Compare
10fcd30
to
44a8be4
Compare
| `rbac.create` | RBAC | `true` | | ||
| `resources` | Pod resource requests and limits | `{}` | | ||
| `settings.log_monitors` | System log monitor config files | `/config/kernel-monitor.json`, `/config/docker-monitor.json` | | ||
| `settings.custom_plugin_monitors` | Custom plugin monitor config files | `/config/kernel-monitor.json`, `/config/docker-monitor.json` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you've copy and pasted this from above but not changed the default value. It should be []
Signed-off-by: Joy Bhattacherjee <[email protected]>
Signed-off-by: Joy Bhattacherjee <[email protected]>
44a8be4
to
4f3bbdb
Compare
…lue for custompluginmonitor Signed-off-by: Joy Bhattacherjee <[email protected]>
Signed-off-by: Joy Bhattacherjee <[email protected]>
fbd1cda
to
b8eba38
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Hashfyre, max-rocket-internet The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…m#10549) * [stable/node-problem-detector] adds --custom-plugin-monitors flag Signed-off-by: Joy Bhattacherjee <[email protected]> * [stable/node-problem-detector] adds documentation custom_plugin_monitor Signed-off-by: Joy Bhattacherjee <[email protected]> * [stable/node-problem-detector] updates readme with correct default value for custompluginmonitor Signed-off-by: Joy Bhattacherjee <[email protected]> * [stable/node-problem-detector] updates chart version to 1.1.3 Signed-off-by: Joy Bhattacherjee <[email protected]>
…m#10549) * [stable/node-problem-detector] adds --custom-plugin-monitors flag Signed-off-by: Joy Bhattacherjee <[email protected]> * [stable/node-problem-detector] adds documentation custom_plugin_monitor Signed-off-by: Joy Bhattacherjee <[email protected]> * [stable/node-problem-detector] updates readme with correct default value for custompluginmonitor Signed-off-by: Joy Bhattacherjee <[email protected]> * [stable/node-problem-detector] updates chart version to 1.1.3 Signed-off-by: Joy Bhattacherjee <[email protected]>
…m#10549) * [stable/node-problem-detector] adds --custom-plugin-monitors flag Signed-off-by: Joy Bhattacherjee <[email protected]> * [stable/node-problem-detector] adds documentation custom_plugin_monitor Signed-off-by: Joy Bhattacherjee <[email protected]> * [stable/node-problem-detector] updates readme with correct default value for custompluginmonitor Signed-off-by: Joy Bhattacherjee <[email protected]> * [stable/node-problem-detector] updates chart version to 1.1.3 Signed-off-by: Joy Bhattacherjee <[email protected]>
What this PR does / why we need it:
--custom-plugin-monitors
flag to the node-problem-detector daemonset run command.settings.custom_plugin_monitors
so custom-monitors can be run with the correct flag.Which issue this PR fixes
Special notes for your reviewer:
Does not fix the crashloopbackoff of NPD, but just adds the ability to add any monitor-config to be run under
--custom-plugin-monitors
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]