Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the container name is inconsistent in output message between podman ps -a and podman kube generate #18499

Closed
chuanchang opened this issue May 8, 2023 · 1 comment
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@chuanchang
Copy link
Contributor

The underline is removed from the container name by podman kube generate command.

  1. the original container name is wonderful_jones
  2. the container name is wonderfuljones in output of podman kube generate command
[ajia@Fedora36 podman]$ git branch
* main
[ajia@Fedora36 podman]$ git rev-parse HEAD
ace3cba5c126fbafa0c70b28342008bd07b7867c
[ajia@Fedora36 podman]$ ./bin/podman pod create mypod
ccb8e69be419dcc32a41fce6905a3114e417dfd8f2724819fb6414c084cd21d4
[ajia@Fedora36 podman]$ ./bin/podman pod ps
POD ID        NAME        STATUS      CREATED        INFRA ID      # OF CONTAINERS
ccb8e69be419  mypod       Created     7 seconds ago  ca61bc8e7b9f  1
[ajia@Fedora36 podman]$ ./bin/podman create --pod mypod alpine top
Resolved "alpine" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull docker.io/library/alpine:latest...
Getting image source signatures
Copying blob f56be85fc22e done
Copying config 9ed4aefc74 done
Writing manifest to image destination
Storing signatures
d7a053e89104b7e2e60be14582aec3b3923539b60462f82e898200950f33553e
[ajia@Fedora36 podman]$ ./bin/podman ps -a
CONTAINER ID  IMAGE                                        COMMAND     CREATED         STATUS      PORTS       NAMES
ca61bc8e7b9f  localhost/podman-pause:4.6.0-dev-1683513087              27 seconds ago  Created                 ccb8e69be419-infra
d7a053e89104  docker.io/library/alpine:latest              top         3 seconds ago   Created                 wonderful_jones
[ajia@Fedora36 podman]$ ./bin/podman kube generate --type deployment --replicas 3 mypod
# Save the output of this file and use kubectl create -f to import
# it into Kubernetes.
#
# Created with podman-4.6.0-dev
apiVersion: apps/v1
kind: Deployment
metadata:
  creationTimestamp: "2023-05-08T02:36:11Z"
  labels:
    app: mypod
  name: mypod-deployment
spec:
  replicas: 3
  selector:
    matchLabels:
      app: mypod
  template:
    metadata:
      creationTimestamp: "2023-05-08T02:36:11Z"
      labels:
        app: mypod
      name: mypod
    spec:
      containers:
      - command:
        - top
        image: docker.io/library/alpine:latest
        name: wonderfuljones
@Luap99
Copy link
Member

Luap99 commented May 8, 2023

This is intentional, see #18054 and #18068. The k8s yaml does not allow underscores in names.

@Luap99 Luap99 closed this as not planned Won't fix, can't repro, duplicate, stale May 8, 2023
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Aug 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

2 participants