'podman generate kube' confuses 'args' with 'command', and no support for 'command' #9211
Labels
In Progress
This issue is actively being worked by the assignee, please do not work on this at this time.
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
In general (not specific to this issue) there is confusion between the Podman/Docker concepts of:
'entrypoint' and 'command'
And the Kubernetes equivalents of:
'command' and 'args'
Podman/Docker 'entrypoint' = Kubernetes 'command'
Podman/Docker 'command' = Kubernetes 'args'
When you use
podman generate kube
on a pod/container with custom command arguments they are put as 'command' in the yml file when it should be 'args'. As a side effect of this, there is no support for a custom entrypoint. You either get the default one, or if you also specify a custom argument, you get the argument in place of the command as described previously.Steps to reproduce the issue:
Create a pod with a container that has a custom (podman/docker) entrypoint and a custom (podman/docker) command:
podman create --entrypoint /bin/sleep --name test --pod new:testpod centos:8 10s
Generate a Kubernetes pod definition:
podman generate kube testpod
Describe the results you received:
The custom command argument is listed as the 'command' (where the entrypoint should be) in the yml output and, as a result the 'entrypoint' is not in the yml file at all.
Describe the results you expected:
I expected to see
Output of
podman version
:Apologies I know this is not the latest build. I tried to search the issues and commits but could not find this referenced.
Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Checked guide: Yes
Latest version: No
The text was updated successfully, but these errors were encountered: