play kube liveness HTTP probe does not use defaults #15855
Labels
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
TLDR: when performing
podman play kube
with a pod containing a livenessProbe using HTTP get, the probe is not working as expected: the path is constructed without the Kubernetes defaults and if the URL is wrong the ExitCode is still 0.The command construction shall take Kubernetes defaults into consideration:
scheme
shall be set tohttp
if tag not presenthost
shall be set tolocalhost
if tag not present (note: with podman there is anyway only one node 😉)path
starts with a/
, so this element shall NOT be present in the default URL to avoid having//
Finally when the URL is invalid and CURL returns an error, the probe shall fail, and this is not the case. See section of
podman inspect
:Steps to reproduce the issue:
liveness.yaml
file:podman play kube liveness.yaml
podman inspect -l | jq ".[].State.Health"
Describe the results you received:
Describe the results you expected:
When the YAML file is tweaked to:
When that is played the result of
podman inspect -l | jq ".[].State.Health"
is:Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
No, but the affected code section looks the same on main, so I do not expect a different behavior.
Additional environment details (AWS, VirtualBox, physical, etc.):
VMware
The text was updated successfully, but these errors were encountered: