spiegel_podman/pkg/specgen/generate
Jasmin Oster d7fa0aa351
Pass the restart policy to the individual containers
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>
2024-03-11 20:39:54 +01:00
..
kube Pass the restart policy to the individual containers 2024-03-11 20:39:54 +01:00
config_common.go chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
config_common_test.go chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
config_freebsd.go chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
config_linux.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
config_linux_seccomp.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
config_linux_test.go chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
container.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
container_create.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
namespaces.go Merge pull request #21512 from Luap99/pasta-netname-removal 2024-02-08 17:17:55 +00:00
namespaces_freebsd.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
namespaces_linux.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
oci.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
oci_freebsd.go Add volumes-from support using annotation in kube yaml 2024-02-14 07:31:43 -08:00
oci_linux.go Add volumes-from support using annotation in kube yaml 2024-02-14 07:31:43 -08:00
pause_image.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
pod_create.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
pod_create_test.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
ports.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
ports_bench_test.go chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
ports_test.go chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
security_freebsd.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
security_linux.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
storage.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
storage_freebsd.go chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
storage_linux.go chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
validate_freebsd.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
validate_linux.go Bump Go module to v5 2024-02-08 09:35:39 -05:00