Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/node-problem-detector] adds custom-plugin-monitor config #10549

Conversation

Hashfyre
Copy link
Contributor

@Hashfyre Hashfyre commented Jan 11, 2019

What this PR does / why we need it:

  • Adds --custom-plugin-monitors flag to the node-problem-detector daemonset run command.
  • Adds 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.]

  • DCO signed
  • Chart Version bumped
  • Variables are documented in the README.md

@helm-bot helm-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 11, 2019
@Hashfyre Hashfyre force-pushed the feature/node-problem-detector/add-custom-plugin-monitor branch from f2b8adf to 683bd50 Compare January 11, 2019 06:33
@helm-bot helm-bot added Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 11, 2019
@Hashfyre Hashfyre force-pushed the feature/node-problem-detector/add-custom-plugin-monitor branch from 4edd27c to 0b141d0 Compare January 11, 2019 06:38
@helm-bot helm-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 11, 2019
@Hashfyre Hashfyre force-pushed the feature/node-problem-detector/add-custom-plugin-monitor branch from 0b141d0 to 26eb44f Compare January 11, 2019 06:45
@helm-bot helm-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 11, 2019
@Hashfyre
Copy link
Contributor Author

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`
Copy link
Contributor

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?

Copy link
Contributor Author

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 }}"
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

@Hashfyre Hashfyre force-pushed the feature/node-problem-detector/add-custom-plugin-monitor branch from 26eb44f to 4ea785b Compare January 14, 2019 12:59
@helm-bot helm-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 14, 2019
@Hashfyre Hashfyre force-pushed the feature/node-problem-detector/add-custom-plugin-monitor branch from 4ea785b to 10fcd30 Compare January 14, 2019 14:35
@helm-bot helm-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 14, 2019
@max-rocket-internet
Copy link
Contributor

@Hashfyre you still haven't fixed the comment about the README.

Again, please don't squash and force push as it means we can't easily see what's changing. This is covered in the guide here 🙂

@Hashfyre Hashfyre force-pushed the feature/node-problem-detector/add-custom-plugin-monitor branch from 10fcd30 to 44a8be4 Compare January 15, 2019 05:54
@helm-bot helm-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 15, 2019
| `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` |
Copy link
Contributor

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 []

@Hashfyre Hashfyre force-pushed the feature/node-problem-detector/add-custom-plugin-monitor branch from 44a8be4 to 4f3bbdb Compare January 15, 2019 16:49
@helm-bot helm-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). labels Jan 15, 2019
Joy Bhattacherjee added 2 commits January 15, 2019 22:23
@Hashfyre Hashfyre force-pushed the feature/node-problem-detector/add-custom-plugin-monitor branch from fbd1cda to b8eba38 Compare January 15, 2019 16:53
@helm-bot helm-bot added Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 15, 2019
@max-rocket-internet
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 15, 2019
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit b3ef3a0 into helm:master Jan 15, 2019
wgiddens pushed a commit to wgiddens/charts that referenced this pull request Jan 18, 2019
…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]>
hakamadare pushed a commit to hakamadare/charts that referenced this pull request Jan 29, 2019
…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]>
hakamadare pushed a commit to hakamadare/charts that referenced this pull request Jan 29, 2019
…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]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[stable/node-problem-detector] missing --custom-plugin-monitors flag
4 participants