-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add multi-file support to podman kube play/down
#27292
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
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Honny1 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 |
Signed-off-by: axel7083 <[email protected]> fix: update kube play command cobra use Signed-off-by: axel7083 <[email protected]> Add multi-file support to podman kube play/down - Support multiple YAML files and URLs in single command - Combine files with YAML document separators (---) - Refactor for better testability with dependency injection - Update documentation with examples for multiple inputs - Improve memory efficiency with streaming I/O operations Fixes: containers#26274 Fixes: https://issues.redhat.com/browse/RUN-3586 Signed-off-by: Jan Rodák <[email protected]>
80a686e
to
45988c5
Compare
cc @axel7083 |
The CI is failing due to an unrelated test: |
} | ||
return response.Body, nil | ||
default: | ||
return os.Open(fileName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just struck me that we're using http.Get()
and I don't think we've set it to use TLS? Should we? Also, can this Get ever hang and never timeout?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should automatically use TLS. I'm not sure about the request timeout, though. I just reused the same function as before, which we're already using in multiple places. Is this considered bad practice in Go?
A couple of questions for consideration. |
reader = f | ||
|
||
if i < len(args)-1 { | ||
combined.WriteString("\n---\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment on top that this is file seperator ? Maybe also have \n---\n
in a const string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment, PR looks good overall
This PR enables
podman kube play
andpodman kube down
to accept multiple YAML files and URLs in a single command.Fixes: #26274
Fixes: https://issues.redhat.com/browse/RUN-3586
Does this PR introduce a user-facing change?