Podman play kube does not respect spec.hostname
setting
#12393
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
After setting customized hostname in play kube yaml file with
spec.hostname
and useplay kube
create pod, the container's hostname is still pod name instead ofspec.hostname
.Steps to reproduce the issue:
use
podman play kube test.yaml
start podpodman exec -it aaa-test hostname
should betest1234
but gotaaa
Describe the results you received:
pod name
Describe the results you expected:
spec.hostname
Additional information you deem important (e.g. issue happens only occasionally):
If use
podman inspect aaa-test --format "{{ .Config.Hostname }}"
will got the correct spec.hostname buthostname
cmd andpython -c "import socket; socket.gethostname()"
will got pod name. If create pod withpodman pod create --hostname test1234 -n aaa
, the hostname been setted correctlly.Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
test with podman v3.4.2 still reproduce this problem
Additional environment details (AWS, VirtualBox, physical, etc.):
physical
The text was updated successfully, but these errors were encountered: