diff options
author | Niall Crowe <nicrowe@redhat.com> | 2022-08-04 09:02:54 +0100 |
---|---|---|
committer | Niall Crowe <nicrowe@redhat.com> | 2022-08-11 16:58:24 +0100 |
commit | d856fb43e11b3a4a93b423d330ce3435afddde4b (patch) | |
tree | b5533938756de79d6340e3a5802ac1a1700fd142 /pkg/bindings/kube/kube.go | |
parent | 92bbae40de3c48ee6b4692ab9e4d7cc14db242bb (diff) | |
download | podman-d856fb43e11b3a4a93b423d330ce3435afddde4b.tar.gz podman-d856fb43e11b3a4a93b423d330ce3435afddde4b.tar.bz2 podman-d856fb43e11b3a4a93b423d330ce3435afddde4b.zip |
Add "podman kube generate" command
"podman kube generate" creates Kubernetes YAML from Podman containers,
pods or volumes. Users will still be able to use "podman generate
kube" as an alias of "kube generate".
Signed-off-by: Niall Crowe <nicrowe@redhat.com>
Diffstat (limited to 'pkg/bindings/kube/kube.go')
-rw-r--r-- | pkg/bindings/kube/kube.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/bindings/kube/kube.go b/pkg/bindings/kube/kube.go index db40c5134..e727439cf 100644 --- a/pkg/bindings/kube/kube.go +++ b/pkg/bindings/kube/kube.go @@ -10,6 +10,7 @@ import ( "github.com/containers/image/v5/types" "github.com/containers/podman/v4/pkg/auth" "github.com/containers/podman/v4/pkg/bindings" + "github.com/containers/podman/v4/pkg/bindings/generate" "github.com/containers/podman/v4/pkg/domain/entities" "github.com/sirupsen/logrus" ) @@ -94,3 +95,8 @@ func DownWithBody(ctx context.Context, body io.Reader) (*entities.KubePlayReport } return &report, nil } + +// Kube generate Kubernetes YAML (v1 specification) +func Generate(ctx context.Context, nameOrIDs []string, options generate.KubeOptions) (*entities.GenerateKubeReport, error) { + return generate.Kube(ctx, nameOrIDs, &options) +} |