diff options
author | Niall Crowe <nicrowe@redhat.com> | 2022-06-24 15:43:05 +0100 |
---|---|---|
committer | Niall Crowe <nicrowe@redhat.com> | 2022-07-13 15:27:03 +0100 |
commit | e08a77ce64eec5cd0192ae1970fa859c00440174 (patch) | |
tree | 434b8a11abe0eb43a5a4e5e99ac4e04fdcc1730f /pkg/domain | |
parent | 4df6122aaa3bc858e9488d366a2c9c91b6671170 (diff) | |
download | podman-e08a77ce64eec5cd0192ae1970fa859c00440174.tar.gz podman-e08a77ce64eec5cd0192ae1970fa859c00440174.tar.bz2 podman-e08a77ce64eec5cd0192ae1970fa859c00440174.zip |
Add "podman kube play" cmd
The "podman kube play" command is designed to be a replacement for the
"podman play kube" command.
It performs the same function as "play kube" while also still working with the same flags and options.
The "podman play kube" command is still functional as an alias of "kube play".
Closes #12475
Signed-off-by: Niall Crowe <nicrowe@redhat.com>
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Diffstat (limited to 'pkg/domain')
-rw-r--r-- | pkg/domain/entities/play.go | 2 | ||||
-rw-r--r-- | pkg/domain/infra/tunnel/play.go | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/pkg/domain/entities/play.go b/pkg/domain/entities/play.go index f1ba21650..35a5d8a4a 100644 --- a/pkg/domain/entities/play.go +++ b/pkg/domain/entities/play.go @@ -90,6 +90,8 @@ type PlayKubeReport struct { PlayKubeTeardown } +type KubePlayReport = PlayKubeReport + // PlayKubeDownOptions are options for tearing down pods type PlayKubeDownOptions struct{} diff --git a/pkg/domain/infra/tunnel/play.go b/pkg/domain/infra/tunnel/play.go index d731a1d6c..ee9195681 100644 --- a/pkg/domain/infra/tunnel/play.go +++ b/pkg/domain/infra/tunnel/play.go @@ -5,12 +5,13 @@ import ( "io" "github.com/containers/image/v5/types" + "github.com/containers/podman/v4/pkg/bindings/kube" "github.com/containers/podman/v4/pkg/bindings/play" "github.com/containers/podman/v4/pkg/domain/entities" ) func (ic *ContainerEngine) PlayKube(ctx context.Context, body io.Reader, opts entities.PlayKubeOptions) (*entities.PlayKubeReport, error) { - options := new(play.KubeOptions).WithAuthfile(opts.Authfile).WithUsername(opts.Username).WithPassword(opts.Password) + options := new(kube.PlayOptions).WithAuthfile(opts.Authfile).WithUsername(opts.Username).WithPassword(opts.Password) options.WithCertDir(opts.CertDir).WithQuiet(opts.Quiet).WithSignaturePolicy(opts.SignaturePolicy).WithConfigMaps(opts.ConfigMaps) options.WithLogDriver(opts.LogDriver).WithNetwork(opts.Networks).WithSeccompProfileRoot(opts.SeccompProfileRoot) options.WithStaticIPs(opts.StaticIPs).WithStaticMACs(opts.StaticMACs) @@ -31,5 +32,5 @@ func (ic *ContainerEngine) PlayKube(ctx context.Context, body io.Reader, opts en } func (ic *ContainerEngine) PlayKubeDown(ctx context.Context, body io.Reader, _ entities.PlayKubeDownOptions) (*entities.PlayKubeReport, error) { - return play.KubeDownWithBody(ic.ClientCtx, body) + return play.DownWithBody(ic.ClientCtx, body) } |