-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
play: kube: add support for in-memory kubefile
The PlayKube and PlayKubeDown commands accept a "path" argument to a YAML file to play. This requires the caller to write the YAML to a file path. The file is opened & used as the body of the HTTP request, so it should be possible to instead pass a io.Reader and use a fully in-memory request body. This commit adds a new backwards-compatible option to PlayKubeOptions and PlayKubeDownOptions - "Body" - which is an io.Reader for the request body. If it is set (non-nil) it will be used instead of os.Open() for the yaml file path. Signed-off-by: Christian Stewart <christian@paral.in>
- Loading branch information
Showing
4 changed files
with
53 additions
and
18 deletions.
There are no files selected for viewing
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