mirror of
https://github.com/containers/podman.git
synced 2025-10-25 18:25:59 +08:00
Healthchecks, defined in a .yaml file as livenessProbe did not had any effect. They were executing as intended, containers were marked as unhealthy, yet no action was taken. This was never the intended behaviour, as observed by the comment: > if restart policy is in place, ensure the health check enforces it A minimal example is tracked in containers/podman#20903 [1] with the following YAML: ```yaml apiVersion: v1 kind: Pod metadata: name: ubi-httpd-24 spec: restartPolicy: Always containers: - name: ubi8-httpd image: registry.access.redhat.com/rhscl/httpd-24-rhel7:2.4-217 livenessProbe: httpGet: path: "/" port: 8081 ``` By passing down the restart policy (and using constants instead of actually wrong hard-coded ones), Podman actually restarts the container now. [1]: https://github.com/containers/podman/issues/20903 Closes #20903. Signed-off-by: Jasmin Oster <nachtjasmin@posteo.de>