diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-09-22 13:39:18 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2021-09-29 16:39:29 -0400 |
commit | 0f87cfd288e48f55cb16e8ed8839485d22f0764c (patch) | |
tree | caaf91d0dace971cfa79348f5ed49517239cf251 /pkg | |
parent | da67c719980ed7e64e168f74b01a2d9105c0b9d0 (diff) | |
download | podman-0f87cfd288e48f55cb16e8ed8839485d22f0764c.tar.gz podman-0f87cfd288e48f55cb16e8ed8839485d22f0764c.tar.bz2 podman-0f87cfd288e48f55cb16e8ed8839485d22f0764c.zip |
podman generate kube should not include images command
If the command came from the underlying image, then we should
not include it in the generate yaml file.
Fixes: https://github.com/containers/podman/issues/11672
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/domain/infra/abi/generate.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/domain/infra/abi/generate.go b/pkg/domain/infra/abi/generate.go index 1e614ce58..081a2464b 100644 --- a/pkg/domain/infra/abi/generate.go +++ b/pkg/domain/infra/abi/generate.go @@ -107,7 +107,7 @@ func (ic *ContainerEngine) GenerateKube(ctx context.Context, nameOrIDs []string, // Generate kube pods and services from pods. if len(pods) >= 1 { - pos, svcs, err := getKubePods(pods, options.Service) + pos, svcs, err := getKubePods(ctx, pods, options.Service) if err != nil { return nil, err } @@ -120,7 +120,7 @@ func (ic *ContainerEngine) GenerateKube(ctx context.Context, nameOrIDs []string, // Generate the kube pods from containers. if len(ctrs) >= 1 { - po, err := libpod.GenerateForKube(ctrs) + po, err := libpod.GenerateForKube(ctx, ctrs) if err != nil { return nil, err } @@ -153,12 +153,12 @@ func (ic *ContainerEngine) GenerateKube(ctx context.Context, nameOrIDs []string, } // getKubePods returns kube pod and service YAML files from podman pods. -func getKubePods(pods []*libpod.Pod, getService bool) ([][]byte, [][]byte, error) { +func getKubePods(ctx context.Context, pods []*libpod.Pod, getService bool) ([][]byte, [][]byte, error) { pos := [][]byte{} svcs := [][]byte{} for _, p := range pods { - po, sp, err := p.GenerateForKube() + po, sp, err := p.GenerateForKube(ctx) if err != nil { return nil, nil, err } |