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 kube play assumes port numbers in liveness probe #18645

Closed
hedayat opened this issue May 21, 2023 · 7 comments · Fixed by #19173
Closed

Podman kube play assumes port numbers in liveness probe #18645

hedayat opened this issue May 21, 2023 · 7 comments · Fixed by #19173
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. kube locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@hedayat
Copy link
Contributor

hedayat commented May 21, 2023

Issue Description

Currently, when using Kubernetes liveness probes, podman assumes that Http/TCP port number is given in the probe, while you can use port name instead. Podman should check if the livenessProbe.tcpSocket.port (and the equivalent HTTP one) is an string or a number, and if it is a string try to interpret it as a port name given in ports.name (which is checked as supported in podman-kube-play man page).

Steps to reproduce the issue

Steps to reproduce the issue

  1. Use a Kybernetes YAML with livenessProbe.tcpSocket.port as a port name
  2. Run the pod using podman kube play, and then inspect the resulting pod
  3. The port in the given nc command is 0 (And the corresponding source code explicitly converts to Port to IntValue).

Describe the results you received

0 port number used

Describe the results you expected

The port number corresponding to the port name should be used instead.

podman info output

Tested with podman 4.5.0

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

Yes

@hedayat hedayat added the kind/bug Categorizes issue or PR as related to a bug. label May 21, 2023
@Luap99 Luap99 added the kube label May 22, 2023
@rhatdan
Copy link
Member

rhatdan commented May 26, 2023

Interested in opening a PR to fix?

@rhatdan
Copy link
Member

rhatdan commented May 26, 2023

@umohnani8 PTAL

@hedayat
Copy link
Contributor Author

hedayat commented May 26, 2023

Interested in opening a PR to fix?

Can't promise right now, but might take a look soon if it was not fixed till then :)

@github-actions
Copy link

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

@rhatdan
Copy link
Member

rhatdan commented Jul 3, 2023

@hedayat @umohnani8 still an issue.

@rhatdan
Copy link
Member

rhatdan commented Jul 3, 2023

@Luap99 Interested in taking a look?

@hedayat
Copy link
Contributor Author

hedayat commented Jul 9, 2023

I'm on it.

hedayat added a commit to hedayat/podman that referenced this issue Jul 10, 2023
@flouthoc flouthoc assigned flouthoc and hedayat and unassigned flouthoc Jul 11, 2023
ashley-cui pushed a commit to ashley-cui/podman that referenced this issue Jul 20, 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 Oct 13, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. 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.

4 participants