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

play: kube: support io.reader body arg and remove tempfiles #13606

Merged
merged 1 commit into from
Mar 24, 2022

Commits on Mar 24, 2022

  1. play: kube: use in-memory kubefile and remove tempfile

    The PlayKube and PlayKubeDown commands accepted a "path" argument to a YAML file
    to play. This requires the caller to write the YAML to a file path. The downside
    of this is apparent in the HTTP handlers which have to use a temporary file on
    disk to store the YAML file.
    
    The file is opened & used as the body of the HTTP request. It's possible to
    instead pass a io.Reader and use a fully in-memory request body.
    
    Add backwards-compatible changes to bindings to allow passing either a filepath
    or a io.Reader body.
    
    Refactor the podman bindings to use a io.Reader instead of a filepath.
    
    Simplify the HTTP handlers for PlayKube by removing the now unneeded tempfile.
    
    [NO NEW TESTS NEEDED]
    
    Signed-off-by: Christian Stewart <christian@paral.in>
    paralin committed Mar 24, 2022
    Configuration menu
    Copy the full SHA
    7526803 View commit details
    Browse the repository at this point in the history