Skip to content

Conversation

Honny1
Copy link
Member

@Honny1 Honny1 commented Oct 14, 2025

This PR enables podman kube play and podman 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?

podman kube play|down support multiple file as arguments

@openshift-ci openshift-ci bot added release-note do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Oct 14, 2025
Copy link
Contributor

openshift-ci bot commented Oct 14, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Honny1
Once this PR has been reviewed and has the lgtm label, please assign ygalblum for approval. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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]>
@Honny1 Honny1 force-pushed the pr-multi-file-support-kube branch from 80a686e to 45988c5 Compare October 14, 2025 17:36
@Honny1
Copy link
Member Author

Honny1 commented Oct 14, 2025

cc @axel7083

@Honny1
Copy link
Member Author

Honny1 commented Oct 14, 2025

The CI is failing due to an unrelated test: Podman search with wildcards.

@Honny1 Honny1 marked this pull request as ready for review October 14, 2025 18:43
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 14, 2025
}
return response.Body, nil
default:
return os.Open(fileName)
Copy link
Member

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?

Copy link
Member Author

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?

@TomSweeneyRedHat
Copy link
Member

A couple of questions for consideration.
Otherwise, LGTM

reader = f

if i < len(args)-1 {
combined.WriteString("\n---\n")
Copy link
Collaborator

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

Copy link
Collaborator

@flouthoc flouthoc left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kube Quadlet should support multiple YAML

4 participants