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

podman generate kube not respect container HOSTNAME and port #13030

Closed
Taymindis opened this issue Jan 27, 2022 · 9 comments · Fixed by #14181
Closed

podman generate kube not respect container HOSTNAME and port #13030

Taymindis opened this issue Jan 27, 2022 · 9 comments · Fixed by #14181
Assignees
Labels
kube locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@Taymindis
Copy link

Taymindis commented Jan 27, 2022

I intended to create a pod with no host and no network sharing.

podman pod create --name cassandra-pod --share cgroup,ipc

Now trying to attach the container to the pod with hostname ss_02

podman run --name ss_02  --pod cassandra-pod --hostname ss_02  -p 9043:9042 -p 8000:7000  -d cassandra:4.0.1

podman generate kube cassandra-pod

(derived from partial), no port mapping, no hostname mapping (instead, it put as Env HOSTNAME????)

 - args:
    - cassandra
    - -f
    env:
    - name: HOSTNAME
      value: ss02
    image: cassandra:4.0.1
    name: ss02
    resources: {}
    securityContext:
      capabilities:
        drop:
        - CAP_MKNOD
        - CAP_NET_RAW
        - CAP_AUDIT_WRITE

@rhatdan
Copy link
Member

rhatdan commented Jan 27, 2022

@umohnani8 PTAL

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Feb 28, 2022

@umohnani8 Any progress?

@umohnani8
Copy link
Member

@Taymindis I tried this out and the port mappings are being set correctly in the generated yaml for me, here is a snippet

...
containers:
  - command:
    - sleep
    - "1000"
    image: registry.fedoraproject.org/fedora:latest
    name: namess02
    ports:
    - containerPort: 7000
      hostPort: 8000
    - containerPort: 9042
      hostPort: 9043
    resources: {}
...

Can you try the latest podman and see if that works for you?

I am also not seeing the hostname being set as an ENV, but will open a PR to set it correctly to the pod spec's hostname.

@rhatdan rhatdan added the kube label Mar 7, 2022
@github-actions
Copy link

github-actions bot commented Apr 7, 2022

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Apr 7, 2022

@umohnani8 Any chance you can look at this?

@umohnani8
Copy link
Member

Yup, working on it

@github-actions
Copy link

github-actions bot commented May 8, 2022

A friendly reminder that this issue had no activity for 30 days.

@github-actions
Copy link

github-actions bot commented Jun 9, 2022

A friendly reminder that this issue had no activity for 30 days.

@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 Sep 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kube locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants