-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow piping input to sonobuoy run (#925)
Often a user wants to use `sonbouoy gen` to generate some YAML and then modify it using tools like jq or yq. We even have this workflow documented and the user has to, end the end, pipe the data into `kubectl apply -f`. `sonobuoy run` is just a shorthand for `sonobuoy gen` + execute with wait logic; it makes sense to allow loading a file or piping the data from stdin. This PR: - adds a --file, -f flag to `sonobuoy run` - if the value is `-` it will load from stdin, erroring if it is not connected to a terminal. It does not add a unit test for this since the `sonobuoy run` logic is difficult to test in a unit test since it wants to talk to a real cluster. We may consider adding this to integration tests but it is mostly just input transformation and leaves little room for error. Fixes #920 Signed-off-by: John Schnake <jschnake@vmware.com>
- Loading branch information
1 parent
3a8f83a
commit 3290552
Showing
6 changed files
with
91 additions
and
40 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters