Skip to content
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

Facilitate printing the default plugin definitions #991

Closed
johnSchnake opened this issue Nov 12, 2019 · 2 comments · Fixed by #1051
Closed

Facilitate printing the default plugin definitions #991

johnSchnake opened this issue Nov 12, 2019 · 2 comments · Fixed by #1051
Assignees
Labels
kind/enhancement New or improved functionality p2-moderate
Milestone

Comments

@johnSchnake
Copy link
Contributor

Describe the solution you'd like
I routinely want to print the plugin definition for the e2e or systemd-logs plugin so that I can tweak a value or two. It is not difficult to do sonobuoy gen and copy/paste but it is a a slight frustration and requires worrying abouut the extra level of indentation we get.

It would be trivial to add support to print these out via something like this:

sonobuoy gen plugin e2e

We already have sonobuoy gen config to help print configs, gen plugin to come up with custom plugins, so it seems natural to support the built-in values too.

@johnSchnake
Copy link
Contributor Author

Actually ran into go-yaml/yaml#463 when trying to just use yaml.Marshal. Seems simple enough to fix too.

@johnSchnake
Copy link
Contributor Author

In sonobuoy gen we use kuberuntime.Encode; since we arent using a config map here there is no real tie to k8s so I don't want to even worry about trying that logic.

@johnSchnake johnSchnake added this to the 0.17.1 milestone Dec 10, 2019
@johnSchnake johnSchnake added the kind/enhancement New or improved functionality label Dec 11, 2019
@johnSchnake johnSchnake self-assigned this Dec 13, 2019
johnSchnake added a commit that referenced this issue Dec 17, 2019
We have the `sonobuoy gen` command which prints a lot of
different types of resources and `sonobuoy gen plugin` which
prints custom plugin definitions. Sometimes it would be helpful
to be able to print the default e2e or sytemdlogs plugin definitions
so that they can be tweaked.

Added two commands `sonobuoy gen plugins e2e` and
`sonobuoy gen plugins systemd-logs` which does this.

Minor tweak to code organization to improve code reuse.

Fixes #991

Signed-off-by: John Schnake <jschnake@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New or improved functionality p2-moderate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant