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

remote: fix podman-remote kube play --publish-all #21103

Merged

Conversation

ttsuuubasa
Copy link
Contributor

Fix podman kube play --publish-all to work in remote environment.

Before this PR:

podman-remote doesn't expose a host port (PORTS) corresponding to containerPort in k8s yaml if --publish-all is specified.

# podman-remote kube play --publish-all pod.yaml 
Pod:
3e5c844a6096f650bb5746415f5d70b5cff59a382d92538a3b6432b3eb4336bc
Container:
97f373367607259edbb1cec627617e518b690cb443a78b921c2aaa98ed1c7616

# podman-remote ps
CONTAINER ID  IMAGE                                        COMMAND               CREATED         STATUS                     PORTS       NAMES
c827dd896efc  localhost/podman-pause:5.0.0-dev-1703821817                        37 seconds ago  Up 35 seconds                          3e5c844a6096-infra
97f373367607  quay.io/libpod/alpine_nginx:latest           nginx -g daemon o...  35 seconds ago  Up 35 seconds (unhealthy)              nginx-pod-nginx-container

After this PR:

podman-remote expose a host port (PORTS) corresponding to containerPort in k8s yaml if --publish-all is specifed.

# podman-remote kube play --publish-all pod.yaml 
Pod:
fb8778ffa24dc6135784507786d760fdee2ded84067a170687f3b3414f9c7f1a
Container:
b349ba916326cb2e5bf448aa7744274e31855d23ade5f00bcb5622f21199872c

# podman ps
CONTAINER ID  IMAGE                                        COMMAND               CREATED        STATUS                  PORTS               NAMES
e4b413342b04  localhost/podman-pause:5.0.0-dev-1703823286                        4 seconds ago  Up 2 seconds            0.0.0.0:80->80/tcp  fb8778ffa24d-infra
b349ba916326  quay.io/libpod/alpine_nginx:latest           nginx -g daemon o...  2 seconds ago  Up 2 seconds (healthy)  0.0.0.0:80->80/tcp  nginx-pod-nginx-container
pod.yaml
apiVersion: v1
kind: Pod
metadata:
  name: nginx-pod
spec:
  containers:
    - name: nginx-container
      image: quay.io/libpod/alpine_nginx:latest
      ports:
      - containerPort: 80

Does this PR introduce a user-facing change?

The remote Podman client's `podman kube play --publish-all` option work now.

Fix `podman kube play --publish-all` to work in remote environment.

Signed-off-by: Tsubasa Watanabe <[email protected]>
@github-actions github-actions bot added the kind/api-change Change to remote API; merits scrutiny label Dec 29, 2023
@rhatdan
Copy link
Member

rhatdan commented Dec 30, 2023

LGTM
/approve
Thanks @fj-tsubasa
@containers/podman-maintainers PTAL

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 30, 2023
Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 3, 2024
Copy link
Contributor

openshift-ci bot commented Jan 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fj-tsubasa, Luap99, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 185fa5b into containers:main Jan 3, 2024
89 of 92 checks passed
@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 Apr 3, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/api-change Change to remote API; merits scrutiny lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants