Skip to content

Allow problem daemon plugins to define their command line options #348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

xueweiz
Copy link
Contributor

@xueweiz xueweiz commented Sep 13, 2019

This is to keep the interface for problem daemon plugins and exporter plugins in sync.

A little background:
We want to make all problem daemons (system-log, system-stats, custom-plugin) and all exporters (k8s, prometheus, stackdriver) into "plugins". By "plugin", what I really mean is this:

  1. NPD main code does not directly import these libraries, and does not use these libraries directly.

  2. Each plugin should be able to be disabled at compile time.

The challenge comes from the existing exporters (k8s, prometheus). They have been existing for a while, and is configured via command-line flags (e.g. --apiserver-override, --apiserver-wait-timeout). So to refactor them into plugins, we had to allow plugins to define their own command-line options.

This flexibility (defining command-line options) is implemented in #335 as part of #346 . So now we face another question:

Do we also change the code for problem daemon plugins so that they follow the same pattern? (i.e. allowing each plugin to define their own command-line interfaces)

  • The benefit we gain is a more unified code base.
  • The down side is that problem daemons already has a pretty unified command-line interfaces (--config.xxx), and does not really need this flexibility. So it's not that crucial.

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Sep 13, 2019
@xueweiz xueweiz mentioned this pull request Sep 13, 2019
@fejta-bot
Copy link

Unknown CLA label state. Rechecking for CLA labels.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/check-cla

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 13, 2019
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 14, 2019
@xueweiz
Copy link
Contributor Author

xueweiz commented Sep 16, 2019

/assign @wangzhen127

@wangzhen127
Copy link
Member

/assign @Random-Liu
I don't have a strong opinion on this. Deferring to @Random-Liu to take a look and see if other OSS projects did similar things.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: xueweiz
To complete the pull request process, please assign random-liu
You can assign the PR to them by writing /assign @random-liu in a comment when ready.

The full list of commands accepted by this bot can be found 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

@xueweiz
Copy link
Contributor Author

xueweiz commented Nov 5, 2019

Hi @Random-Liu , could you help take a look for this PR when you have time? Thanks :)
(No rush, this is not blocking anything.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 4, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 5, 2020
@xueweiz
Copy link
Contributor Author

xueweiz commented Mar 5, 2020

I don't think Zhen and Lantao would have time to review this in these days.
I'm going to close this PR for now. If this becomes important in the future, we can then bump it up.

@xueweiz xueweiz closed this Mar 5, 2020
@xueweiz
Copy link
Contributor Author

xueweiz commented Mar 5, 2020

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants