summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-08-25 14:42:12 -0400
committerGitHub <noreply@github.com>2021-08-25 14:42:12 -0400
commit49cfed756f5dfb6d9267eb29d31f651578c9037c (patch)
tree677b6acfee4b6fddc1b08d8181ce3552a5ccab68 /pkg/domain
parentfefa0b32c74fc5d394a0e2bd5b4564bedb3ed15d (diff)
parent1dc6d14735eef1e51368103aefba3d7c704dcfe3 (diff)
downloadpodman-49cfed756f5dfb6d9267eb29d31f651578c9037c.tar.gz
podman-49cfed756f5dfb6d9267eb29d31f651578c9037c.tar.bz2
podman-49cfed756f5dfb6d9267eb29d31f651578c9037c.zip
Merge pull request #11103 from jwhonce/wip/bindings
Fix file descriptor leaks in bindings and add test
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/entities/generate.go2
-rw-r--r--pkg/domain/infra/tunnel/generate.go3
2 files changed, 5 insertions, 0 deletions
diff --git a/pkg/domain/entities/generate.go b/pkg/domain/entities/generate.go
index 3ec713edf..8a437061f 100644
--- a/pkg/domain/entities/generate.go
+++ b/pkg/domain/entities/generate.go
@@ -35,6 +35,8 @@ type GenerateKubeOptions struct {
}
// GenerateKubeReport
+//
+// FIXME: Podman4.0 should change io.Reader to io.ReaderCloser
type GenerateKubeReport struct {
// Reader - the io.Reader to reader the generated YAML file.
Reader io.Reader
diff --git a/pkg/domain/infra/tunnel/generate.go b/pkg/domain/infra/tunnel/generate.go
index 0e768b30b..3d3cd52be 100644
--- a/pkg/domain/infra/tunnel/generate.go
+++ b/pkg/domain/infra/tunnel/generate.go
@@ -16,6 +16,9 @@ func (ic *ContainerEngine) GenerateSystemd(ctx context.Context, nameOrID string,
return generate.Systemd(ic.ClientCtx, nameOrID, options)
}
+// GenerateKube Kubernetes YAML (v1 specification) for nameOrIDs
+//
+// Note: Caller is responsible for closing returned Reader
func (ic *ContainerEngine) GenerateKube(ctx context.Context, nameOrIDs []string, opts entities.GenerateKubeOptions) (*entities.GenerateKubeReport, error) {
options := new(generate.KubeOptions).WithService(opts.Service)
return generate.Kube(ic.ClientCtx, nameOrIDs, options)